primus852/simple-crypt

Simple String Crypt

1.2.0 2018-09-21 11:58 UTC

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);