MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_drbg_pr_sha256

Method test_drbg_pr_sha256

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

Source from the content-addressed store, hash-verified

7153 @unittest.expectedFailure # TODO: RUSTPYTHON; - AF_ALG not fully implemented
7154 @support.requires_linux_version(4, 3) # see test_aes_cbc
7155 def test_drbg_pr_sha256(self):
7156 # deterministic random bit generator, prediction resistance, sha256
7157 with self.create_alg('rng', 'drbg_pr_sha256') as algo:
7158 extra_seed = os.urandom(32)
7159 algo.setsockopt(socket.SOL_ALG, socket.ALG_SET_KEY, extra_seed)
7160 op, _ = algo.accept()
7161 with op:
7162 rn = op.recv(32)
7163 self.assertEqual(len(rn), 32)
7164
7165 def test_sendmsg_afalg_args(self):
7166 sock = socket.socket(socket.AF_ALG, socket.SOCK_SEQPACKET, 0)

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected