MCPcopy Create free account
hub / github.com/GmSSL/GmSSL-Go / Update

Method Update

sm3.go:83–87  ·  view source on GitHub ↗
(data []byte)

Source from the content-addressed store, hash-verified

81}
82
83func (hmac *Sm3Hmac) Update(data []byte) {
84 if len(data) > 0 {
85 C.sm3_hmac_update(&hmac.sm3_hmac_ctx, (*C.uchar)(unsafe.Pointer(&data[0])), C.size_t(len(data)))
86 }
87}
88
89func (hmac *Sm3Hmac) GenerateMac() []byte {
90 mac := make([]byte, Sm3HmacSize)

Callers 2

TestSm3HmacFunction · 0.95
mainFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestSm3HmacFunction · 0.76