26 Star 237 Fork 49

golang-module / dongle

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
md5.go 254 Bytes
一键复制 编辑 原始数据 按行查看 历史
gouguoyin 提交于 2021-08-11 15:23 . 实现md5加密
package dongle
import (
"crypto/md5"
)
// ByMd5 encrypts by md5.
func (e encrypt) ByMd5() encrypt {
if e.Error != nil {
return e
}
if len(e.input) == 0 {
return e
}
hash := md5.New()
hash.Write(e.input)
e.output = hash.Sum(nil)
return e
}
Go
1
https://gitee.com/golang-module/dongle.git
git@gitee.com:golang-module/dongle.git
golang-module
dongle
dongle
v0.0.2

搜索帮助