Thoughts of just about anything
Posts tagged Encryption
Write OpenSSL files in PHP
Mar 16th
A while back I wrote a post on how to Read OpenSSL files in PHP, and a reader asked how would you write a file.
Well I thought that’s easy you just do the same thing but use the encrypt function. Well I should have known better. Two hours later and a whole lot of research yield that PHP doesn’t do PKCS#5 padding when using PHP’s mcrypt API. But luckly duerra had a simple solution. So after padding my input everything worked fine. More >
Read OpenSSL files in PHP
Apr 18th
I finally got PHP to open encrypted files created with OpenSSL. I use openssl in the command line to encrypt files with AES cipher 128 block size and 256 key length with salt. More >