primus852 / simple-crypt
Simple String Crypt
Installs: 218
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Type:package
Requires
- php: ^7.0
- ext-openssl: *
- defuse/php-encryption: ^2.1
This package is auto-updated.
Last update: 2024-04-20 00:51:31 UTC
README
Very simple way to crypt strings (do not use to crypt sensitive data)
Usage
$sc = new SimpleCrypt('my-salt', 'iv');
Encrypt
$encrypted = $sc->encrypt('TEST');
Decrypt
$decrypted = $sc->decrypt($encrypted);
Static
$enc = SimpleCrypt::enc('TEST');
$dec = SimpleCrypt::dec($enc);
Cipher ( https://github.com/defuse/php-encryption)
$enc = SimpleCrypt::encCipher('TEST','MyLongASCIIKey');
$dec = SimpleCrypt::decCipher($enc,'MyLongASCIIKey);