(self)
| 7006 | @unittest.expectedFailure # TODO: RUSTPYTHON; - AF_ALG not fully implemented |
| 7007 | @support.requires_linux_version(4, 5) |
| 7008 | def test_sha256(self): |
| 7009 | expected = bytes.fromhex("ba7816bf8f01cfea414140de5dae2223b00361a396" |
| 7010 | "177a9cb410ff61f20015ad") |
| 7011 | with self.create_alg('hash', 'sha256') as algo: |
| 7012 | op, _ = algo.accept() |
| 7013 | with op: |
| 7014 | op.sendall(b"abc") |
| 7015 | self.assertEqual(op.recv(512), expected) |
| 7016 | |
| 7017 | op, _ = algo.accept() |
| 7018 | with op: |
| 7019 | op.send(b'a', socket.MSG_MORE) |
| 7020 | op.send(b'b', socket.MSG_MORE) |
| 7021 | op.send(b'c', socket.MSG_MORE) |
| 7022 | op.send(b'') |
| 7023 | self.assertEqual(op.recv(512), expected) |
| 7024 | |
| 7025 | @unittest.expectedFailure # TODO: RUSTPYTHON; - AF_ALG not fully implemented |
| 7026 | def test_hmac_sha1(self): |
nothing calls this directly
no test coverage detected