X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FUtils%2FCrypt.php;h=cfd7b09b9a9f6b85f6adc4bde4d575b4eea9fcd8;hb=21b109a8ef89d32840a6c6bdc52aec2824ac9285;hp=688a3229ab59c64debc70e21079e3984e3e86050;hpb=2099e281172b0622067cc4791d032155c9156e42;p=civicrm-core.git diff --git a/CRM/Utils/Crypt.php b/CRM/Utils/Crypt.php index 688a3229ab..cfd7b09b9a 100644 --- a/CRM/Utils/Crypt.php +++ b/CRM/Utils/Crypt.php @@ -55,6 +55,7 @@ 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'; @@ -66,6 +67,7 @@ class CRM_Utils_Crypt { mcrypt_generic_deinit($td); mcrypt_module_close($td); } + // phpcs:enable return base64_encode($string); } @@ -94,6 +96,7 @@ 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'; @@ -104,6 +107,7 @@ class CRM_Utils_Crypt { $string = rtrim(mdecrypt_generic($td, $string)); mcrypt_generic_deinit($td); mcrypt_module_close($td); + // phpcs:enable } return $string;