MCPcopy Create free account
hub / github.com/aboutcode-org/scancode-toolkit / get_hasher

Function get_hasher

src/commoncode/hash.py:123–127  ·  view source on GitHub ↗

Return a hasher for a given size in bits of the resulting hash.

(bitsize)

Source from the content-addressed store, hash-verified

121
122
123def get_hasher(bitsize):
124 """
125 Return a hasher for a given size in bits of the resulting hash.
126 """
127 return _hashmodules_by_bitsize[bitsize]
128
129
130class sha1_git_hasher(Hashable):

Callers 4

test_get_hasherMethod · 0.90
test_short_hashesMethod · 0.90
__init__Method · 0.85
hash.pyFile · 0.85

Calls

no outgoing calls

Tested by 2

test_get_hasherMethod · 0.72
test_short_hashesMethod · 0.72