dorantor/simple-crypt

Very simple lib for symmetric en/decrypt messages so they could be sent through untrusted channels.

Installs: 9 158

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/dorantor/simple-crypt

v1.0.1 2017-06-21 19:00 UTC

This package is auto-updated.

Last update: 2025-09-20 03:42:31 UTC


README

Very simple lib for symmetric en/decrypt messages so they could be sent through untrusted channels.

Installation

composer require dorantor/simple-crypt

Usage

// 32 byte string as key
$key = md5('simple-crypt'); // 1b8ee2dc7723b2846792349dd4c74dc2
$crypt = new \Dorantor\SimpleCrypt($key);

$eMessage = $crypt->encrypt('Secret message that should be read only by trusted ones');

// ...

$oMessage = $crypt->decrypt($eMessage);

License

The library is released under the MIT License. See the bundled LICENSE file for details.