dorantor / simple-crypt
一个非常简单的库,用于对称加密和解密消息,以便它们可以通过不可信的通道发送。
v1.0.1
2017-06-21 19:00 UTC
Requires
- php: ^5.6|^7.0
- ext-openssl: *
This package is auto-updated.
Last update: 2024-09-20 00:58:58 UTC
README
一个非常简单的库,用于对称加密和解密消息,以便它们可以通过不可信的通道发送。
安装
composer require dorantor/simple-crypt
使用
// 32 byte string as key $key = md5('simple-crypt'); // 1b8ee2dc7723b2846792349dd4c74dc2 $crypt = new \Dorantor\SimpleCrypt($key); $eMessage = $crypt->encrypt('Secret message that should be read only by trusted ones'); // ... $oMessage = $crypt->decrypt($eMessage);
许可证
该库遵循MIT许可证发布。有关详细信息,请参阅附带LICENSE文件。