octopus/pkg/utils/hash.go

12 lines
143 B
Go
Raw Normal View History

2023-03-22 22:45:17 +08:00
package utils
import (
"crypto/md5"
"encoding/hex"
)
func MD5(d []byte) string {
hash := md5.Sum(d)
return hex.EncodeToString(hash[:])
}