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) +``` +