File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -242,11 +242,15 @@ def verify(self, mac_tag):
242242 raise ValueError ("MAC check failed" )
243243
244244 def hexverify (self , hex_mac_tag ):
245- """Return the **printable** MAC tag of the message authenticated so far.
245+ """Verify that a given **printable** MAC (computed by another party)
246+ is valid.
246247
247- :return: The MAC tag, computed over the data processed so far.
248- Hexadecimal encoded.
249- :rtype: string
248+ Args:
249+ hex_mac_tag (string): the expected MAC of the message, as a hexadecimal string.
250+
251+ Raises:
252+ ValueError: if the MAC does not match. It means that the message
253+ has been tampered with or that the MAC key is incorrect.
250254 """
251255
252256 self .verify (unhexlify (tobytes (hex_mac_tag )))
You can’t perform that action at this time.
0 commit comments