Files
atom/utils/hash/md5.go
2023-01-30 16:57:48 +08:00

13 lines
166 B
Go

package hash
import (
"crypto/md5"
"encoding/hex"
)
func MD5(str []byte, b ...byte) string {
h := md5.New()
h.Write(str)
return hex.EncodeToString(h.Sum(b))
}