moccalotto/crypto
最新稳定版本:0.8.1
Composer 安装命令:
composer require moccalotto/crypto
包简介
Tiny encryption lib for PHP
关键字:
README 文档
README
Encrypt data using aes-128-cbc. Message authentication is done via sha-256 HMAC
Installation
To add this package as a local, per-project dependency to your project, simply add a dependency on
moccalotto/crypto to your project's composer.json file like so:
{
"require": {
"moccalotto/crypto": "~0.8"
}
}
Alternatively simply call composer require moccalotto/crypto
Demo
<?php use Moccalotto\Crypto\Crypto; require 'vendor/autoload.php'; $key = 'some secret key'; $plaintext = 'This is the secret plaintext to be encrypted'; $encrypted = Crypto::with($key)->encrypt($plaintext); echo Crypto::with($key)->decrypt($encrypted) . PHP_EOL;
统计信息
- 总下载量: 28
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-09-09