Skip to content
Snippets Groups Projects
Commit 150c1ef1 authored by Jaime Pérez Crespo's avatar Jaime Pérez Crespo
Browse files

bugfix: mb_strlen() needs the encoding too.

parent d86980b0
No related branches found
No related tags found
No related merge requests found
......@@ -36,7 +36,7 @@ class Crypto
$hmac = mb_substr($ciphertext, 0, 32, '8bit');
$iv = mb_substr($ciphertext, 32, 16, '8bit');
$msg = mb_substr($ciphertext, 48, mb_strlen($ciphertext) - 48, '8bit');
$msg = mb_substr($ciphertext, 48, mb_strlen($ciphertext, '8bit') - 48, '8bit');
// authenticate the ciphertext
if (self::secureCompare(hash_hmac('sha256', $iv.$msg, substr($key, 64, 64), true), $hmac)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment