1 Star 0 Fork 0

莫问/moyu

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
crypto.go 395 Bytes
一键复制 编辑 原始数据 按行查看 历史
莫问 提交于 2021-05-18 14:44 +08:00 . v.10
package excrypto
import (
"crypto/md5"
"crypto/sha1"
"crypto/sha256"
"fmt"
)
//////////////////////////
///加密部分
//////////////
func Md5(str string) string {
return fmt.Sprintf("%x", md5.Sum([]byte(str)))
}
func Sha1(str string) string {
return fmt.Sprintf("%x", sha1.Sum([]byte(str)))
}
func Sha256(str string) string {
return fmt.Sprintf("%x", sha256.Sum256([]byte(str)))
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/mowens/moyu.git
git@gitee.com:mowens/moyu.git
mowens
moyu
moyu
v0.2.0

搜索帮助