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

Method Verify

types/request_type.go:130–137  ·  view source on GitHub ↗

Verify checks hash and signature in whole request.

()

Source from the content-addressed store, hash-verified

128
129// Verify checks hash and signature in whole request.
130func (r *Request) Verify() (err error) {
131 // verify payload hash in signed header
132 if err = verifyHash(&r.Payload, &r.Header.QueriesHash); err != nil {
133 return
134 }
135 // verify header sign
136 return r.Header.Verify()
137}
138
139// Sign the request.
140func (r *Request) Sign(signer *asymmetric.PrivateKey) (err error) {

Callers 4

TestRequest_SignFunction · 0.95
BenchmarkEncodeFunction · 0.95
CheckMethod · 0.95
BenchmarkSignSignatureFunction · 0.95

Calls 2

verifyHashFunction · 0.85
VerifyMethod · 0.65

Tested by 3

TestRequest_SignFunction · 0.76
BenchmarkEncodeFunction · 0.76
BenchmarkSignSignatureFunction · 0.76