The Crypt package provides pure PHP encryption methods with no external dependencies.
Add the following to your composer file:
"repositories": [
{
"type": "vcs",
"url": "https://github.com/sinevia/php-library-crypt.git"
}
],
"require": {
"sinevia/php-library-crypt": "dev-master"
},
$pass = 'test';
$enc = Sinevia\Crypt::xorEncode('test',$pass);
$dec = Sinevia\Crypt::xorDecode(enc,$pass);