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

Method get_random_data

Lib/test/test_zlib.py:156–161  ·  view source on GitHub ↗

Get a triplet (data, iv, checksum).

(self, data_len, *, iv=None)

Source from the content-addressed store, hash-verified

154 raise NotImplementedError
155
156 def get_random_data(self, data_len, *, iv=None):
157 """Get a triplet (data, iv, checksum)."""
158 data = random.randbytes(data_len)
159 init = self.parse_iv(iv)
160 checksum = self.checksum(data, init)
161 return data, init, checksum
162
163 def test_combine_empty(self):
164 for _ in range(self.N):

Callers 4

test_combine_emptyMethod · 0.95
test_combine_no_ivMethod · 0.95
test_combine_with_ivMethod · 0.95

Calls 3

parse_ivMethod · 0.95
checksumMethod · 0.95
randbytesMethod · 0.45

Tested by

no test coverage detected