工具
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tools/utils/sha1.go

13 lines
170 B

package utils
import (
"crypto/sha1"
"encoding/hex"
)
func Sha1(str string) string {
h := sha1.New()
h.Write([]byte(str))
return hex.EncodeToString(h.Sum(nil))
}