Updating server dependancies. (#7246)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
2c895ee66e
Коммит
96eab12027
14
vendor/github.com/stretchr/objx/security.go
сгенерированный
поставляемый
Обычный файл
14
vendor/github.com/stretchr/objx/security.go
сгенерированный
поставляемый
Обычный файл
@@ -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))
|
||||
}
|
||||
Ссылка в новой задаче
Block a user