123456789101112131415161718192021222324252627282930313233343536373839404142 |
- package common
-
- import (
- "crypto/hmac"
- "crypto/sha256"
- )
-
- const (
-
- HMAC_SHA256 = "HMAC-SHA256"
- )
-
-
- func HMAC_Sha256(data string, secret string) []byte {
- h := hmac.New(sha256.New, []byte(secret))
- h.Write([]byte(data))
- return h.Sum(nil)
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
|