security - Where should I store an encryption key for php? -


i'm writing php application accepts sensitive customer data, , need encrypt before storing in mysql database. i'm going use mysql's built-in aes functionality column-level encryption.

i want avoid storing encryption key on server, , i'm going provide web-page administrator log-in, , enter encryption key. want store key in memory while application running, never permanently disk.

what best way this?

can modify $_server array store information between requests? can store key apache in way? maybe shared memory?

rather rely on mysql aes encryption, why not use php's native openssl encryption scheme (a pecl extension). requires private , public key, public encrypt, private decrypt, , keys can kept in separate places.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -