1 Star 1 Fork 0

amuluze/amutool

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
hash.go 378 Bytes
一键复制 编辑 原始数据 按行查看 历史
jialong.wang 提交于 2023-04-20 16:21 . feat: update readme file
// Package hashx
// Date: 2022/9/7 09:45
// Author: Amu
// Description:
package hashx
import (
"crypto/md5"
"crypto/sha1"
"fmt"
)
func MD5(b string) string {
md5h := md5.New()
_, _ = md5h.Write([]byte(b))
return fmt.Sprintf("%x", md5h.Sum(nil))
}
func SHA1(b string) string {
md5h := sha1.New()
_, _ = md5h.Write([]byte(b))
return fmt.Sprintf("%x", md5h.Sum(nil))
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/amuluze/amutool.git
git@gitee.com:amuluze/amutool.git
amuluze
amutool
amutool
6d4b89917063

搜索帮助