MCPcopy Create free account
hub / github.com/corestoreio/pkg / EqualReader

Method EqualReader

util/hashpool/hashpool.go:118–144  ·  view source on GitHub ↗

EqualReader hashes io.Reader and compares it with MAC for equality without leaking timing information. The internal buffer to read into data from io.Reader can be adjusted via field BufferSize.

(r io.Reader, mac []byte)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 2

TestTank_EqualReaderFunction · 0.80

Calls 6

GetMethod · 0.95
PutMethod · 0.95
ConstantTimeCompareMethod · 0.80
WriteMethod · 0.65
ReadMethod · 0.45
SumMethod · 0.45

Tested by 2

TestTank_EqualReaderFunction · 0.64