sumeetghimire / encrypt-decrypt-with-key
一个用于使用密钥加密和解密字符串的Laravel包
1.0.3
2024-01-31 12:18 UTC
Requires
- php: ^8.1
- laravel/framework: ^8.0|^9.0|^10.0
README
EncryptDecryptWithKey
Laravel EncryptDecryptWithKey 包
配置
您可以通过修改config/encrypt-decrypt.php
文件来自定义包配置。
许可证
Laravel EncryptDecryptWithKey 包是开源软件,采用MIT许可证。
支持
对于任何问题或建议,请在GitHub上提交问题。
致谢
本包由Sumeet Ghimire维护。
Laravel
在您的composer.json
中添加此包并更新composer。
composer require sumeetghimire/encrypt-decrypt-with-key
使用示例
use SumeetGhimire\EncryptDecryptWithKey\EncryptionHelper; $encryptedString = EncryptionHelper::encryptString('test'); $decryptedString = EncryptionHelper::decryptString($encryptedString); return $decryptedString; // 返回 'test'
在.env中密钥将自动生成,根据您的需求进行更改
ENCRYPT_KEY=8141b227d15377e8249b4c2cd42df4a7