Compare commits
2 Commits
9931590d80
...
e68b22a6e1
Author | SHA1 | Date | |
---|---|---|---|
e68b22a6e1 | |||
1fcde5ff76 |
11
string.go
11
string.go
@ -58,6 +58,17 @@ func (s *stringOperate) Md5(str string) string {
|
|||||||
return hex.EncodeToString(h.Sum(nil))
|
return hex.EncodeToString(h.Sum(nil))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Md5FromByte 从字节数组计算签名
|
||||||
|
//
|
||||||
|
// Author : go_developer@163.com<白茶清欢>
|
||||||
|
//
|
||||||
|
// Date : 2022/10/21 14:12:16
|
||||||
|
func (s *stringOperate) Md5FromByte(data []byte) string {
|
||||||
|
h := md5.New()
|
||||||
|
_, _ = h.Write(data)
|
||||||
|
return hex.EncodeToString(h.Sum(nil))
|
||||||
|
}
|
||||||
|
|
||||||
// GenRandomMd5 生成随机md5
|
// GenRandomMd5 生成随机md5
|
||||||
//
|
//
|
||||||
// Author : go_developer@163.com<白茶清欢>
|
// Author : go_developer@163.com<白茶清欢>
|
||||||
|
Reference in New Issue
Block a user