MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / Verify

Method Verify

xenomint/types/common.go:62–77  ·  view source on GitHub ↗

Verify implements hashSignVerifier.Verify.

(obj marshalHasher)

Source from the content-addressed store, hash-verified

60
61// Verify implements hashSignVerifier.Verify.
62func (i *DefaultHashSignVerifierImpl) Verify(obj marshalHasher) (err error) {
63 var enc []byte
64 if enc, err = obj.MarshalHash(); err != nil {
65 return
66 }
67 var h = hash.THashH(enc)
68 if !i.DataHash.IsEqual(&h) {
69 err = ErrHashValueNotMatch
70 return
71 }
72 if !i.Signature.Verify(h[:], i.Signee) {
73 err = ErrSignatureNotMatch
74 return
75 }
76 return
77}

Callers

nothing calls this directly

Calls 4

THashHFunction · 0.92
MarshalHashMethod · 0.65
VerifyMethod · 0.65
IsEqualMethod · 0.45

Tested by

no test coverage detected