Этот коммит содержится в:
Christopher Speller
2018-01-29 14:17:40 -08:00
коммит произвёл GitHub
родитель 8d66523ba7
Коммит 961c04cae9
1508 изменённых файлов: 182081 добавлений и 24688 удалений

8
vendor/github.com/stretchr/objx/security.go сгенерированный поставляемый
Просмотреть файл

@@ -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[:])
}