1
0
mirror of https://github.com/charlienet/go-mixed.git synced 2025-07-18 00:22:41 +08:00
This commit is contained in:
2022-03-27 10:21:06 +08:00
parent 7a17c79372
commit 12460b06ad
2 changed files with 74 additions and 0 deletions

19
hmac/hmac_test.go Normal file
View File

@ -0,0 +1,19 @@
package hmac_test
import (
"crypto/hmac"
"encoding/hex"
"testing"
"github.com/tjfoc/gmsm/sm3"
)
func TestHmac(t *testing.T) {
key := []byte("")
msg := []byte("123")
h := hmac.New(sm3.New, key)
h.Write(msg)
t.Log(hex.EncodeToString(h.Sum(nil)))
}