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;