X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb-python/blobdiff_plain/8854283a73ebad561270b3f138887ab2a90f41b5..f61394b9ea8967d895a561936d1a47fc5cb83d08:/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)