mirror of
https://github.com/Yubico/yubikey-ksm.git
synced 2025-02-26 21:54:17 +01:00
Replaced the deprecated use of 'mcrypt_ecb' with 'mdecrypt_generic'
This commit is contained in:
parent
69aaab6193
commit
d43308eb56
@ -45,11 +45,13 @@ function modhex2hex($m)
|
|||||||
|
|
||||||
function aes128ecb_decrypt($key,$in)
|
function aes128ecb_decrypt($key,$in)
|
||||||
{
|
{
|
||||||
return bin2hex(mcrypt_ecb(MCRYPT_RIJNDAEL_128,
|
$td = mcrypt_module_open(MCRYPT_RIJNDAEL_128, '', 'ecb', '');
|
||||||
hex2bin($key),
|
$iv = hex2bin('00000000000000000000000000000000');
|
||||||
hex2bin($in),
|
mcrypt_generic_init($td, hex2bin($key), $iv);
|
||||||
MCRYPT_DECRYPT,
|
$result = bin2hex(mdecrypt_generic($td, hex2bin($in)));
|
||||||
hex2bin('00000000000000000000000000000000')));
|
mcrypt_generic_deinit($td);
|
||||||
|
|
||||||
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
function calculate_crc($token)
|
function calculate_crc($token)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user