Add missing testify/mock

This commit is contained in:
Harshavardhana
2015-03-27 23:27:17 -07:00
parent 8e8281e210
commit fc3ee4d459
40 changed files with 11578 additions and 1 deletions
+14
View File
@@ -0,0 +1,14 @@
package objx
import (
"crypto/sha1"
"encoding/hex"
)
// 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))
}