X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb-python/blobdiff_plain/3b5f9ac06397ff2c0b87d9c6f6288d222f8f9861..dad564fa66dd0ab52058f25a0eaf6a8e5b3c4316:/t/t-algorithms.py diff --git a/t/t-algorithms.py b/t/t-algorithms.py index fc6bff2..2fd0e09 100644 --- a/t/t-algorithms.py +++ b/t/t-algorithms.py @@ -742,6 +742,13 @@ class TestKeccak (HashBufferTestMixin): st1.mix(m0).step() me.assertNotEqual(st0.extract(32), st1.extract(32)) + ## Check state copying. + st1 = st0.copy() + mask = st1.extract(len(m1)) + st0.mix(m1) + st1.mix(m1) + me.assertEqual(st0.extract(32), st1.extract(32)) + ## Check error conditions. _ = st0.extract(200) me.assertRaises(ValueError, st0.extract, 201)