From 34e1c4b81204c80d3f06c26ed89bc2566dd4fa91 Mon Sep 17 00:00:00 2001 From: renzhiyuan <465386466@qq.com> Date: Thu, 20 Feb 2025 17:51:53 +0800 Subject: [PATCH] first push --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..24d5bad --- /dev/null +++ b/README.md @@ -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) //CryptAES,CryptRSA,CryptSM2,CryptSM4 + encryptData, err := cryptFunc(appInfo).Encrypt(text) + t.Log(string(encryptData), err) + decryptData, err := cryptFunc(appInfo).Decrypt(string(encryptData)) + t.Log(string(decryptData), err) +``` +