Crypto.prototype.encryptOldMethod = function (key, data, algorithm) {
  // Default value
  var crypted = false;

  try {