What is the simplest way of doing two way encryption in common PHP installs?
I need to be able to encrypt data with a string key, and use the same key to decrypt on
IMPORTANT this answer is valid only for PHP 5, in PHP 7 use built-in cryptographic functions.
Here is simple but secure enough implementation:
Code and examples are here: https://stackoverflow.com/a/19445173/1387163