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

Method test_drbg_pr_sha256

Lib/test/test_socket.py:7245–7253  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

7243
7244 @support.requires_linux_version(4, 3) # see test_aes_cbc
7245 def test_drbg_pr_sha256(self):
7246 # deterministic random bit generator, prediction resistance, sha256
7247 with self.create_alg('rng', 'drbg_pr_sha256') as algo:
7248 extra_seed = os.urandom(32)
7249 algo.setsockopt(socket.SOL_ALG, socket.ALG_SET_KEY, extra_seed)
7250 op, _ = algo.accept()
7251 with op:
7252 rn = op.recv(32)
7253 self.assertEqual(len(rn), 32)
7254
7255 def test_sendmsg_afalg_args(self):
7256 sock = socket.socket(socket.AF_ALG, socket.SOCK_SEQPACKET, 0)

Callers

nothing calls this directly

Calls 5

create_algMethod · 0.95
setsockoptMethod · 0.45
acceptMethod · 0.45
recvMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected