PHP script for DES/CBC/ with PKCS5Padding encryption and decryption
I would like to know in the following code if PKCS#5 padding is added ? If not how to add ? $message = "insert plaintext message here"; $iv = pack('H*', 'insert hex iv here'); $key = pack('H*', 'insert hex key here'); $enc = mcrypt_encrypt(MCRYPT_DES, $key, $message, MCRYPT_MODE_CBC, $iv); echo bin2hex($enc); I also want to create a PHP code to decrypt a string created with DES/CBC/PKCS5Padding. I think the above mentioned code can be modified to get a decryption. The important thing for me is to get the PKCS#5 Padding and Unpadding script. No, it is not added. Unfortunately PHP / mcrypt uses