Verify implements hashSignVerifier.Verify.
(obj marshalHasher)
| 60 | |
| 61 | // Verify implements hashSignVerifier.Verify. |
| 62 | func (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 | } |
nothing calls this directly
no test coverage detected