go sha1 By 竣峰 发表于 2023-03-31 文章目录 1234567891011121314151617package mainimport ( "crypto/sha1" "encoding/hex" "fmt")func SHA1(s string) string { o := sha1.New() o.Write([]byte(s)) return hex.EncodeToString(o.Sum(nil))}func main(){ fmt.Println(SHA1("123456"))}