https://github.com/ledccn/ledc-crypt
加密解密与加签验签
https://github.com/ledccn/ledc-crypt
Last synced: 4 months ago
JSON representation
加密解密与加签验签
- Host: GitHub
- URL: https://github.com/ledccn/ledc-crypt
- Owner: ledccn
- Created: 2024-09-27T15:44:07.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-07-30T14:35:13.000Z (11 months ago)
- Last Synced: 2025-10-04T19:35:34.908Z (9 months ago)
- Language: PHP
- Size: 65.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 加密解密、加签验签
## 安装
`composer require ledc/crypt`
## 使用
开箱即用,只需要传入一个配置,初始化一个实例即可:
```php
use Ledc\Crypt;
$crypt = new AesCrypt($aesKey, 'aes-128-cbc', 'sha256', 30);
```
在创建实例后,所有的方法都可以有IDE自动补全;例如:
```php
// 加密
$crypt->encrypt($data);
// 解密
$crypt->decrypt($payload, $signature);
```
## 捐赠
