mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
* Add gandi LiveDNS api provider * vendor testify and gandi live DNS * govendor update github.com/prasmussen/gandi-api/{client,live_dns} * Fix Gandi-livedns TXT unit test * TravisCI should use go 1.10
15 lines
273 B
Go
15 lines
273 B
Go
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))
|
|
}
|