mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-01 02:38:12 +00:00
github.com/stretchr/objx v0.1.1, github.com/stretchr/testify v1.2.2
This commit is contained in:
8
vendor/github.com/stretchr/objx/security.go
generated
vendored
8
vendor/github.com/stretchr/objx/security.go
generated
vendored
@@ -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[:])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user