-
I want to use this library to decrypt large (2-8GB) Binary files that were encrypted using PHP OpenSSL_encrypt with AES-256-CBC. I have the following code that is working well:
The files were encrypted with this command in PHP:
The files are decrypted with only small differences in the hex dumps. The decrypted files have 16 bytes of 10101010 at almost every chunk I encrypted the files with. I have tried every possible option for the AES Padding and cannot get it to change at all. Im thinking the makeDecryptor does not have the ability to cleanup the padding created from PHP so when I try to access the binary file it is corrupted. Is there a good way to removing padding on decryption or not? I also tried the isLast on every update call so it would remove the padding each time, that resulted in a slightly smaller file but there is a huge chunk of the file that does not match the original. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I was able to make it work setting up a separate decryptor for each chunk of my encrypted files so that the isLast worked properly for my data structure. |
Beta Was this translation helpful? Give feedback.
I was able to make it work setting up a separate decryptor for each chunk of my encrypted files so that the isLast worked properly for my data structure.