+--------------------------------------------------------------------+
| CiviCRM version 5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2018 |
+ | Copyright CiviCRM LLC (c) 2004-2019 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2018
+ * @copyright CiviCRM LLC (c) 2004-2019
*/
class CRM_Utils_Crypt {
if (function_exists('mcrypt_module_open') &&
defined('CIVICRM_SITE_KEY')
) {
+ // phpcs:disable
$td = mcrypt_module_open(MCRYPT_RIJNDAEL_256, '', MCRYPT_MODE_ECB, '');
// ECB mode - iv not needed - CRM-8198
$iv = '00000000000000000000000000000000';
mcrypt_generic_deinit($td);
mcrypt_module_close($td);
}
+ // phpcs:enable
return base64_encode($string);
}
if (function_exists('mcrypt_module_open') &&
defined('CIVICRM_SITE_KEY')
) {
+ // phpcs:disable
$td = mcrypt_module_open(MCRYPT_RIJNDAEL_256, '', MCRYPT_MODE_ECB, '');
// ECB mode - iv not needed - CRM-8198
$iv = '00000000000000000000000000000000';
$string = rtrim(mdecrypt_generic($td, $string));
mcrypt_generic_deinit($td);
mcrypt_module_close($td);
+ // phpcs:enable
}
return $string;