aboutsummaryrefslogtreecommitdiff
path: root/frozen_deps/Cryptodome/Hash/CMAC.py
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2024-08-23 03:14:03 +0000
committerDeterminant <[email protected]>2024-08-22 20:34:57 -0700
commit8d1c76ec7caf247d5675e14260d20fc508977ffb (patch)
tree8fa7c8ce3b7e3f4ece150a6da5922b5eb2dc7772 /frozen_deps/Cryptodome/Hash/CMAC.py
parent258780284151d49cba1d9c0d2ce33f9a19bb058b (diff)
release v0.1.8
Diffstat (limited to 'frozen_deps/Cryptodome/Hash/CMAC.py')
-rw-r--r--frozen_deps/Cryptodome/Hash/CMAC.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/frozen_deps/Cryptodome/Hash/CMAC.py b/frozen_deps/Cryptodome/Hash/CMAC.py
index e831700..8feb79f 100644
--- a/frozen_deps/Cryptodome/Hash/CMAC.py
+++ b/frozen_deps/Cryptodome/Hash/CMAC.py
@@ -242,11 +242,15 @@ class CMAC(object):
raise ValueError("MAC check failed")
def hexverify(self, hex_mac_tag):
- """Return the **printable** MAC tag of the message authenticated so far.
+ """Verify that a given **printable** MAC (computed by another party)
+ is valid.
- :return: The MAC tag, computed over the data processed so far.
- Hexadecimal encoded.
- :rtype: string
+ Args:
+ hex_mac_tag (string): the expected MAC of the message, as a hexadecimal string.
+
+ Raises:
+ ValueError: if the MAC does not match. It means that the message
+ has been tampered with or that the MAC key is incorrect.
"""
self.verify(unhexlify(tobytes(hex_mac_tag)))