This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.

A sha256 HMAC key, RIJNDAEL_256 AES CBC @ 1024 cost encryption class

v1.01 2015-04-17 17:35 UTC

This package is auto-updated.

Last update: 2021-09-19 02:46:19 UTC


A secure hmac 3 part shared key encryption class. RIJNDAEL_256 AES CBC @ 1024 cost, with sha256 HMAC keys.



    "require": {
        "lcherone/encryption": "dev-master"


require 'vendor/autoload.php';

use Encryption\Encryption;

$crypt = new Encryption();

# Something to Encrypt
$str = "encrypt this";

# Generate a final key made up from 3 other keys - not for storing
$key = $crypt->makeKey(
    'a token key',
    'a public key',
    'a private key'

# Encrypt
echo $encrypted = $crypt->encrypt($str, $key);

# Decrypt
echo $crypt->decrypt($encrypted, $key);