primus852/simple-crypt

Simple String Crypt

Installs: 230

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

Type:package

pkg:composer/primus852/simple-crypt

1.2.0 2018-09-21 11:58 UTC

This package is auto-updated.

Last update: 2025-10-20 04:08:09 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);