Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fusiondirectory
fusiondirectory
Commits
e833d52c
Commit
e833d52c
authored
Mar 23, 2016
by
Côme Chilliet
Browse files
Fixes
#4621
Removed calls to mcrypt and use openssl instead
parent
becb2340
Changes
1
Hide whitespace changes
Inline
Side-by-side
include/functions.inc
View file @
e833d52c
...
...
@@ -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
);
}
...
...
Côme Chilliet
@cchilliet
mentioned in issue
#1474 (closed)
·
Sep 02, 2017
mentioned in issue
#1474 (closed)
mentioned in issue #1474
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment