I am trying to write an application that requires me to encrypt users data, I have a couple of questions regarding encryption
Is "defuse/php-encryption" secure to use in a business environment?
How to use this script to insert and retrieve the data from a MYSQL database?
The "correct" way to store encryption keys?
I am trying to store the encrypted information in a BLOB field in a MYSQL database.
After Ive inserted the data into the database (a simple PDO insert) it will say;
"DANGER! DANGER! The ciphertext has been tampered with!"
I assume this has something to do with me inserting the data into the database!
The idea I had was generating one key, storing the generated key some where in a PHP script and using only one key.
What is the most secure way of;
generating a key?
storing the key?
fetching & decrypting the data at a later date?
Any help || reading material is greatly appreciated!