kanti / mcrypt
Simpel Static mcrypt helper object
Installs: 197
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Open Issues: 0
pkg:composer/kanti/mcrypt
Requires
- php: >=5.3
This package is not auto-updated.
Last update: 2020-01-20 03:57:32 UTC
README
install via Composer
command line:
composer require kanti/mcrypt ~1
composer.json:
"require":{ "kanti/mcrypt": "~1" }
how to use it
<?php require_once "vendor/autoload.php"; $key = "Password"; $data = file_get_contents(__FILE__); $options = array(); $jsonString = Kanti\MCrypt::encrypt($key, $data, $options); $data = Kanti\MCrypt::decrypt($key, $jsonString); var_dump($jsonString); var_dump($data);
$options
option | default |
---|---|
algorithm | MCRYPT_RIJNDAEL_256 |
mode | MCRYPT_MODE_CBC |
iv | php mcrypt_create_iv(mcrypt_get_iv_size($algorithm, $mode), MCRYPT_DEV_URANDOM) |
Changlog
Version 1.3
Incompatible to Version 1.2 Data.