Gibberish AES encryption tools.

Based on https://github.com/mdp/gibberish-aes (MIT) and notes by nbari at dalmp dot com on 15-Jan-2012 07:52 at http://www.php.net/manual/en/function.openssl-decrypt.php

link https://github.com/mdp/gibberish-aes
link http://www.php.net/manual/en/function.openssl-decrypt.php
category OSS
package OSS_Crypt
copyright Copyright (c) 2007 - 2012, Open Source Solutions Limited, Dublin, Ireland
license New BSD License

 Methods

Decrypt the given `$edata` using AES 256 symmetrical cipher

decrypt(string $edata, string $password) : string
Static

See tests/OSS/Crypt/GibberishAESTest.php for examples

Parameters

$edata

string

The encrypted data to decrypt

$password

string

The symmectrical password used for the encryption

Returns

stringThe original data decrypted (or false on failure)

Encrypt the given `$data` using AES 256 symmetrical cipher

encrypt(string $data, string $password) : string
Static

See tests/OSS/Crypt/GibberishAESTest.php for examples

Parameters

$data

string

The data to encrypt

$password

string

The symmectrical password to use for the encryption

Returns

stringBase64 encrypted data with embedded (random) salt