Page 1 of 1
Mysql image storage issue
Posted: Thu Feb 26, 2015 10:57 am
by cap2cap10
Greetings again, members of the PHP Technorati. Ok I am currently trying to discover how to encrypt image (jpeg or png) and store it in the mysql db. So is it possible for mysql to encrypt an uploaded image using AES or does php have to be used to encrypt the image and then store it in the db with out the use of AES?
Desperately need a code sample for this. Dealing with HIPAA law requirements.
Thanks in advance,
Batoe
PS: The road to success is filled with obstacles,....but also success!!
Re: Mysql image storage issue
Posted: Thu Feb 26, 2015 1:32 pm
by requinix
MySQL can do
AES encryption, but you would be sending the image data unencrypted and thus sniffable (unless you're using SSL).
Personally I'd do the encryption in PHP. Much more control that way.
Re: Mysql image storage issue
Posted: Thu Nov 05, 2015 8:57 am
by cap2cap10
Found a PHP AES class that encrypts and decrypts images, allowing for storage in Database. Thanks again.
Batoe

Re: Mysql image storage issue
Posted: Mon Nov 09, 2015 5:05 pm
by pickle
I strongly recommend you don't store the image file in the database. It'll absolutely murder your page generation times.
Re: Mysql image storage issue
Posted: Mon Nov 16, 2015 9:32 am
by Pazuzu156
pickle wrote:I strongly recommend you don't store the image file in the database. It'll absolutely murder your page generation times.
Agreed, it's just impractical. Rather store meta data for the image in the database and the image on the server.