(self)
| 7100 | # at least on ppc64le architecture |
| 7101 | @support.requires_linux_version(4, 5) |
| 7102 | def test_sha256(self): |
| 7103 | expected = bytes.fromhex("ba7816bf8f01cfea414140de5dae2223b00361a396" |
| 7104 | "177a9cb410ff61f20015ad") |
| 7105 | with self.create_alg('hash', 'sha256') as algo: |
| 7106 | op, _ = algo.accept() |
| 7107 | with op: |
| 7108 | op.sendall(b"abc") |
| 7109 | self.assertEqual(op.recv(512), expected) |
| 7110 | |
| 7111 | op, _ = algo.accept() |
| 7112 | with op: |
| 7113 | op.send(b'a', socket.MSG_MORE) |
| 7114 | op.send(b'b', socket.MSG_MORE) |
| 7115 | op.send(b'c', socket.MSG_MORE) |
| 7116 | op.send(b'') |
| 7117 | self.assertEqual(op.recv(512), expected) |
| 7118 | |
| 7119 | def test_hmac_sha1(self): |
| 7120 | # gh-109396: In FIPS mode, Linux 6.5 requires a key |
nothing calls this directly
no test coverage detected