From 36797f70e349197a88c1a20838ff79012c2096b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= <come.bernigaud@opensides.be> Date: Wed, 23 Mar 2016 09:34:15 +0100 Subject: [PATCH] Fixes #4621 Removed calls to mcrypt and use openssl instead --- include/functions.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/functions.inc b/include/functions.inc index 6c70c3a8e..6caf93cb1 100644 --- a/include/functions.inc +++ b/include/functions.inc @@ -3023,7 +3023,7 @@ function cred_decrypt($input, $password) $input = substr($input, 16); $key_len = 32; - $iv_len = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC); + $iv_len = openssl_cipher_iv_length('aes-256-cbc'); $data = ''; $d = ''; @@ -3034,7 +3034,7 @@ function cred_decrypt($input, $password) $key = substr($data, 0, $key_len); $iv = substr($data, $key_len, $iv_len); - return rtrim(mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $key, $input, MCRYPT_MODE_CBC, $iv), "\x00..\x1F"); + return openssl_decrypt($input, 'aes-256-cbc', $key, OPENSSL_RAW_DATA, $iv); } -- GitLab