garsaud/cryptstreamaes
最新稳定版本:v1.0.0
Composer 安装命令:
composer require garsaud/cryptstreamaes
包简介
Encrypt and decrypt php resources (streams) on-the-fly using AES 128, 192, 256
README 文档
README
This package encrypts and decrypts resources (streams) using AES 128, 192 or 256 using mcrypt.
It operates on resources (local or remote obtained via fopen(…)) in chunks, making it possible to process very large contents without exceeding the memory limit.
Installation
composer require garsaud/cryptstreamaes
Usage
use Garsaud\CryptStreamAES\AES; use Garsaud\CryptStreamAES\Length; $aes = new AES(Length::AES256); $aes->encrypt( key: 'B374A26A71490437AA024E4FADD5B497FDFF1A8EA6FF12F6FB65AF2720B59CCF', inputStream: fopen('myfile.jpg', 'rb'), outputStream: fopen('myfile-encrypted.bin', 'wb'), );
use Garsaud\CryptStreamAES\AES; use Garsaud\CryptStreamAES\Length; $aes = new AES(Length::AES256); $aes->decrypt( key: 'B374A26A71490437AA024E4FADD5B497FDFF1A8EA6FF12F6FB65AF2720B59CCF', inputStream: fopen('myfile-encrypted.bin', 'rb'), outputStream: fopen('myfile.jpg', 'wb'), );
统计信息
- 总下载量: 6
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-02-20