octopus/pkg/utils/hash.go
2023-03-22 22:45:17 +08:00

12 lines
143 B
Go

package utils
import (
"crypto/md5"
"encoding/hex"
)
func MD5(d []byte) string {
hash := md5.Sum(d)
return hex.EncodeToString(hash[:])
}