mcrypt_decrypt() error change key size

后端 未结 8 1640
慢半拍i
慢半拍i 2020-12-06 05:17

mcrypt_decrypt(): Key of size 15 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported

How Can I fix this issue? my

8条回答
  •  自闭症患者
    2020-12-06 05:34

    I had this issue with OSTicket 1.6 ST (yes old version I know). Hosting company just went to PHP 5.6 and it broke the Mail Fetch for cron.php. I'm posting this hoping it helps others fix this issue faster.

    You have to edit the file "include/class.misc.php".

    Add the function "pad_key" provided in the answer authored by @troskater to the "include/class.misc.php" file and then on line 51 in the function "decrypt" change

    return trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $salt,...

    to instead use

    return trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, pad_key($salt),...

提交回复
热议问题