dandjo / simple-obfuscator
A simple class to encrypt and decrypt strings with a given salt (bijective).
Installs: 552
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/dandjo/simple-obfuscator
Requires
- php: >=5.6
This package is auto-updated.
Last update: 2025-10-28 07:30:29 UTC
README
A simple class to encrypt and decrypt strings with a given salt (bijective).
Installation
composer require dandjo/simple-obfuscator
Usage
Instantiate the Obfuscator.
// create a new instance $salt = 'my-security-by-obscurity'; $obfuscator = new \Dandjo\SimpleObfuscator\SimpleObfuscator($salt);
Then you can encrypt your string and decrypt the generated hex string.
$encrypted = $obfuscator->encrypt('4711-foobar'); // $encrypted == "6f927ea5a49b7c" $decrypted = $obfuscator->decrypt('6f927ea5a49b7c'); // $decrypted === "4711-foobar"