b753599 ^
0ef35ca ^
1 2 3 4 5 6 7 8
9 10
11 12 13 14 15
package hibp import ( "crypto/sha1" "encoding/hex" "strings" ) // GetSHA1Hash takes a string as an input & returns SHA-1 Hash func GetSHA1Hash(pass string) string { alg := sha1.New() alg.Write([]byte(pass)) return strings.ToUpper(hex.EncodeToString(alg.Sum(nil))) }