MCPcopy
hub / github.com/tjfoc/gmsm / msgHash

Function msgHash

sm2/sm2.go:426–431  ·  view source on GitHub ↗
(za, msg []byte)

Source from the content-addressed store, hash-verified

424}
425
426func msgHash(za, msg []byte) (*big.Int, error) {
427 e := sm3.New()
428 e.Write(za)
429 e.Write(msg)
430 return new(big.Int).SetBytes(e.Sum(nil)[:32]), nil
431}
432
433// ZA = H256(ENTLA || IDA || a || b || xG || yG || xA || yA)
434func ZA(pub *PublicKey, uid []byte) ([]byte, error) {

Callers 2

Sm3DigestMethod · 0.85
Sm2VerifyFunction · 0.85

Calls 3

NewFunction · 0.92
WriteMethod · 0.45
SumMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…