1
0
mirror of https://github.com/charlienet/go-mixed.git synced 2025-09-18 18:31:57 +08:00

fix 密钥错误

This commit is contained in:
2025-08-05 14:57:17 +08:00
parent 9d12e7fedb
commit b14262e9eb

View File

@ -80,7 +80,7 @@ func Sha512(key, msg []byte) bytesconv.BytesResult { return sum(sha512.New, key,
func Sm3(key, msg []byte) bytesconv.BytesResult { return sum(sm3.New, key, msg) } func Sm3(key, msg []byte) bytesconv.BytesResult { return sum(sm3.New, key, msg) }
func sum(f func() hash.Hash, msg, key []byte) bytesconv.BytesResult { func sum(f func() hash.Hash, key, msg []byte) bytesconv.BytesResult {
h := hmac.New(f, key) h := hmac.New(f, key)
h.Write(msg) h.Write(msg)