Join GitHub today
Why does not Crypt check hmac? #13379
Why does not Crypt check hmac?
When decrypting an encrypted character, entering a different key will return an incorrect decryption character.
$text = 'This is a secret text'; $key = 'le password'; $encrypted = $crypt->encrypt($text, $key); $key = 'le password2'; echo $crypt->decrypt($encrypted, $key);
If hmac is checked and is not valid, an empty string must be returned.