Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/perkeep/perkeep
/ HashMatches
Method
HashMatches
pkg/blob/ref.go:187–192 ·
view source on GitHub ↗
(h hash.Hash)
Source
from the content-addressed store, hash-verified
185
}
186
187
func
(r Ref) HashMatches(h hash.Hash) bool {
188
if
r.digest == nil {
189
return
false
190
}
191
return
bytes.Equal(h.Sum(nil), r.digest.bytes())
192
}
193
194
const
hexDigit =
"0123456789abcdef"
195
Callers
14
ValidContents
Method · 0.45
HashMatches
Method · 0.45
Read
Method · 0.45
verifySizeAndHash
Function · 0.45
ReceiveBlob
Method · 0.45
ReceiveBlob
Method · 0.45
Fetch
Method · 0.45
TestReindex
Function · 0.45
testPack
Function · 0.45
TestForeachZipBlob
Function · 0.45
copyBlob
Method · 0.45
hourlyCompare
Method · 0.45
Calls
3
Equal
Method · 0.80
Sum
Method · 0.80
bytes
Method · 0.65
Tested by
4
verifySizeAndHash
Function · 0.36
TestReindex
Function · 0.36
testPack
Function · 0.36
TestForeachZipBlob
Function · 0.36