Download the PHP package lancerhe/php-crypt without Composer
On this page you can find all versions of the php package lancerhe/php-crypt. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package php-crypt
PHP Crypt
Crypt for AES, RSA, 3DES and some special algorithms.
Requirements
PHP5.3.0 or later
Installation
Create or modify your composer.json
{
"require": {
"lancerhe/php-crypt": "1.1.0"
}
}
Usage
AES
require('./vendor/autoload.php');
$key = 'nh9a6d2b6s6g9ynh';
$iv = 'ddky2235gee1g3mr';
$source = 'my message';
$crypt = new \LancerHe\Crypt\AES();
$encrypt = $crypt->encrypt($source, $key, $iv);
var_dump($encrypt); // S5r5uy5zA7yTGIMj0rk68A==
$decrypt = $crypt->decrypt($encrypt, $key, $iv);
var_dump($source); // my message
3DES
require('./vendor/autoload.php');
$key = '6d2b6s6g';
$iv = '2235gee1';
$source = 'my message';
$crypt = new \LancerHe\Crypt\TripleDES();
$encrypt = $crypt->encrypt($source, $key, $iv);
var_dump($encrypt); // JPZDDBXGOXZc949A+ggNlA==
$decrypt = $crypt->decrypt($encrypt, $key, $iv);
var_dump($source); // my message
RSA
require('./vendor/autoload.php');
$crypt = new \LancerHe\Crypt\RSA('/tmp/');
$encrypt = $crypt->pubEncrypt('new message');
var_dump($encrypt); // rand base64_encode
$decrypt = $crypt->privDecrypt($encrypt);
var_dump($decrypt); // new message
Id
require('./vendor/autoload.php');
$crypt = new \LancerHe\Crypt\Id();
$encrypt = $crypt->encrypt(23123123);
var_dump($encrypt); // w6lt46urq
$decrypt = $crypt->decrypt($encrypt);
var_dump($encrypt); // 23123123
All versions of php-crypt with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.3.0
The package lancerhe/php-crypt contains the following files
Loading the files please wait ....