Vendor main dependencies.
This commit is contained in:
parent
49a09ab7dd
commit
dd5e3fba01
2738 changed files with 1045689 additions and 0 deletions
14
vendor/github.com/stretchr/objx/security.go
generated
vendored
Normal file
14
vendor/github.com/stretchr/objx/security.go
generated
vendored
Normal 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))
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue