ronakiihglobal/stringcrypto
Composer 安装命令:
composer require ronakiihglobal/stringcrypto
包简介
encrypt decrypt id/string with ease
README 文档
README
This is simple package for encrypt/decrypt small strings like database IDs with ease. It is based on openssl_encrypt.
The encrypt method used is AES-256-CBC.
Usage
composer require ronakiihglobal/stringcrypto
then
require_once __DIR__ . '/vendor/autoload.php';
use ronakiihglobal\stringcrypto\Crypto;
$crypto = new Crypto("testkey","testIv"); these values should be random string of length 16 and should be managed as secret in env variables.
$encrypted = $crypto::encrypt("123"); this value should be string.
$decrypted = $crypto::decrypt($encrypted);
统计信息
- 总下载量: 11
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-05-22