1 Star 0 Fork 0

火焰雨/golin

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
JCheck.go 574 Bytes
一键复制 编辑 原始数据 按行查看 历史
火焰雨 提交于 2024-02-22 15:47 +08:00 . 修改加密逻辑
package golin
import (
"crypto/md5"
"fmt"
)
type JCheck struct {
}
func (*JCheck) Md5_32Check(content any, isuppercase ...bool) (value string) {
text := allType.DtoText(content)
value = fmt.Sprintf("%x", md5.Sum([]byte(text)))
if len(isuppercase) > 0 && isuppercase[0] {
value = allText.DDToUppercase(value)
}
return
}
func (Class *JCheck) JEncryptandDecrypt_lin(text string, key any, isEncrypt bool) (value string) {
newkey := Class.Md5_32Check(key, true)
if isEncrypt {
value = encrypt(text, newkey)
} else {
value = decrypt(text, newkey)
}
return
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/Nicklaos/golin.git
git@gitee.com:Nicklaos/golin.git
Nicklaos
golin
golin
v0.0.4

搜索帮助