MCPcopy Index your code
hub / github.com/python/cpython / checksum

Method checksum

Lib/test/test_zlib.py:141–147  ·  view source on GitHub ↗

Compute the checksum of data with a given initial value. The *init* value is parsed by ``parse_iv``.

(self, data, init=None)

Source from the content-addressed store, hash-verified

139 return iv
140
141 def checksum(self, data, init=None):
142 """Compute the checksum of data with a given initial value.
143
144 The *init* value is parsed by ``parse_iv``.
145 """
146 iv = self.parse_iv(init)
147 return self._checksum(data, iv)
148
149 def _checksum(self, data, init):
150 raise NotImplementedError

Callers 5

get_random_dataMethod · 0.95
test_combine_emptyMethod · 0.95
test_combine_no_ivMethod · 0.95
test_combine_with_ivMethod · 0.95

Calls 2

parse_ivMethod · 0.95
_checksumMethod · 0.95

Tested by

no test coverage detected