first push

This commit is contained in:
renzhiyuan 2025-02-20 17:51:53 +08:00
parent 39c1edf66a
commit 34e1c4b812
1 changed files with 24 additions and 0 deletions

24
README.md Normal file
View File

@ -0,0 +1,24 @@
## 安装
```bash
$ go get -u gitea.cdlsxd.cn/self-tools/l_crypt
```
## 使用
```go
text := "YOUR NEEDD ENCRYPT TEXT"
var appInfo = &AppEncrypt{
UniKEY: "yourEncryptToken",
}
cryptFunc := Crypt(CryptAES) //CryptAESCryptRSACryptSM2CryptSM4
encryptData, err := cryptFunc(appInfo).Encrypt(text)
t.Log(string(encryptData), err)
decryptData, err := cryptFunc(appInfo).Decrypt(string(encryptData))
t.Log(string(decryptData), err)
```