This is a question in relation to the following response to an Encryption / Decryption question:
https://stackoverflow.com/a/5093422/2691346
I love this class, but I'm having trouble storing and retrieving the encrypted data on my database.
As the encrypted data contains all sorts of apparently unpredictable characters / codes, I'm using this:
$value = addslashes($e->encrypt($value, $randomnumber));
It's definitely generating an encrypted value, but when I try to update my database with it, it's not storing the entire value.
I've tried both text and blob column types, but neither appear to be correct.
Would mysql_real_escape_string be better than addslashes?
Am I using the correct column type?
Please can someone show me where I'm going wrong?
Many thanks!