primus852 / simple-crypt
Simple String Crypt
1.2.0
2018-09-21 11:58 UTC
Requires
- php: ^7.0
- ext-openssl: *
- defuse/php-encryption: ^2.1
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-08-20 05:52:48 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);