1
0
mirror of https://github.com/charlienet/go-mixed.git synced 2025-07-18 00:22:41 +08:00
Files
go-mixed/hmac/hmac_test.go
2022-03-27 10:21:06 +08:00

20 lines
260 B
Go

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)))
}