There was an error while loading. Please reload this page.
1 parent 0061029 commit d1598cdCopy full SHA for d1598cd
Doc/src/hash/kmac128.rst
@@ -22,13 +22,13 @@ And this is an example showing how to validate the KMAC128 tag::
22
>>> from Crypto.Hash import KMAC128
23
>>>
24
>>> # We have received a message 'msg' together
25
- >>> # with its MAC 'mac'
+ >>> # with its MAC 'mac_tag'
26
27
>>> secret = b'Sixteen byte key'
28
>>> mac = KMAC128.new(key=secret, mac_len=16)
29
>>> mac.update(msg)
30
>>> try:
31
- >>> mac.verify(mac)
+ >>> mac.verify(mac_tag)
32
>>> print("The message '%s' is authentic" % msg)
33
>>> except ValueError:
34
>>> print("The message or the key is wrong")
0 commit comments