chiark
/
gitweb
/
~mdw
/
catacomb-python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3b5f9ac
)
t/t-algorithms.py: Add a simple test for `Keccak1600.copy'.
author
Mark Wooding
<mdw@distorted.org.uk>
Sun, 17 Nov 2019 23:42:26 +0000
(23:42 +0000)
committer
Mark Wooding
<mdw@distorted.org.uk>
Wed, 27 Nov 2019 15:11:29 +0000
(15:11 +0000)
t/t-algorithms.py
patch
|
blob
|
blame
|
history
diff --git
a/t/t-algorithms.py
b/t/t-algorithms.py
index fc6bff2e83d29bbfb7b71d1bb62c1bbddf415147..2fd0e090656c26783047ff76be19b85ee1d90445 100644
(file)
--- 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))
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)
## Check error conditions.
_ = st0.extract(200)
me.assertRaises(ValueError, st0.extract, 201)