MCPcopy
hub / github.com/perkeep/perkeep / NewHash

Function NewHash

pkg/blob/ref.go:734–736  ·  view source on GitHub ↗

NewHash returns a new hash.Hash of the currently recommended hash type. Currently this is SHA-224, but is subject to change over time.

()

Source from the content-addressed store, hash-verified

732// NewHash returns a new hash.Hash of the currently recommended hash type.
733// Currently this is SHA-224, but is subject to change over time.
734func NewHash() hash.Hash {
735 return sha256.New224()
736}
737
738func ValidRefString(s string) bool {
739 // TODO: optimize to not allocate

Callers 15

updatePhotoMethod · 0.92
updatePhotoInAlbumMethod · 0.92
vivifyFunction · 0.92
TestPackNormalFunction · 0.92
TestPackLargeFunction · 0.92
TestReindexFunction · 0.92
testOpenWholeRefMethod · 0.92
TestPackerBoundarySplitsFunction · 0.92
packMethod · 0.92
writeAZipMethod · 0.92
BlobRefMethod · 0.92
populateFileMethod · 0.92

Calls

no outgoing calls

Tested by 6

TestPackNormalFunction · 0.74
TestPackLargeFunction · 0.74
TestReindexFunction · 0.74
testOpenWholeRefMethod · 0.74
TestPackerBoundarySplitsFunction · 0.74
ReadMethod · 0.74