mailgun dep

This commit is contained in:
Patrick Nagurny
2020-11-23 11:12:53 -05:00
parent b011b28cf5
commit ece803ec68
242 changed files with 25496 additions and 11732 deletions

View File

@@ -5,13 +5,8 @@ import (
"encoding/hex"
)
// HashWithKey hashes the specified string using the security
// key.
// HashWithKey hashes the specified string using the security key
func HashWithKey(data, key string) string {
hash := sha1.New()
_, err := hash.Write([]byte(data + ":" + key))
if err != nil {
return ""
}
return hex.EncodeToString(hash.Sum(nil))
d := sha1.Sum([]byte(data + ":" + key))
return hex.EncodeToString(d[:])
}