diff --git a/lib/Cake/Utility/Security.php b/lib/Cake/Utility/Security.php index 247a94684ec..e9017c1951d 100644 --- a/lib/Cake/Utility/Security.php +++ b/lib/Cake/Utility/Security.php @@ -319,7 +319,7 @@ public static function encrypt($plain, $key, $hmacSalt = null) { $ivSize = mcrypt_get_iv_size($algorithm, $mode); $iv = mcrypt_create_iv($ivSize, MCRYPT_DEV_URANDOM); - $ciphertext = $iv . mcrypt_encrypt($algorithm, $key, $plain, $mode, $iv); + $ciphertext = $iv . mcrypt_encrypt($algorithm, $key, $plain, $mode, $iv); $hmac = hash_hmac('sha256', $ciphertext, $key); return $hmac . $ciphertext; }