github.com/stretchr/objx v0.1.1, github.com/stretchr/testify v1.2.2

This commit is contained in:
Jordan Liggitt
2019-04-06 10:39:05 -04:00
parent 3cabb5e654
commit e8e15acff6
70 changed files with 847 additions and 1040 deletions

View File

@@ -5,10 +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()
hash.Write([]byte(data + ":" + key))
return hex.EncodeToString(hash.Sum(nil))
d := sha1.Sum([]byte(data + ":" + key))
return hex.EncodeToString(d[:])
}