mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 12:24:38 +03:00
Selective export (#770)
This commit is contained in:
12
vendor/github.com/stretchr/objx/security.go
generated
vendored
Normal file
12
vendor/github.com/stretchr/objx/security.go
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
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[:])
|
||||
}
|
||||
Reference in New Issue
Block a user