Kepler core
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

16 lines
265 B

package misc
import (
"crypto/hmac"
"crypto/sha1"
"encoding/hex"
)
func HMAC_Sign(key string, params ...string) string {
m := hmac.New(sha1.New, []byte(key))
for _, x := range params {
m.Write([]byte(x))
}
s := hex.EncodeToString(m.Sum(nil))
return s
}