1
0
mirror of https://github.com/getsops/sops.git synced 2026-02-05 21:45:26 +01:00
Files
sops/vendor/github.com/stretchr/objx/security.go
2018-03-30 21:19:35 +02:00

13 lines
243 B
Go

package objx
import (
"crypto/sha1"
"encoding/hex"
)
// HashWithKey hashes the specified string using the security key
func HashWithKey(data, key string) string {
d := sha1.Sum([]byte(data + ":" + key))
return hex.EncodeToString(d[:])
}