summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2013-11-20 16:35:06 (GMT)
committerChristian Heimes <christian@cheimes.de>2013-11-20 16:35:06 (GMT)
commitc4ab11050d3efa7dd409a96d006435d282d5815e (patch)
tree6ac7ac7dc3936425fdaca8bcab19c39ebeb50612 /Doc/library
parent634919a9fa1fffe3d36b13b4248f99508b5999ed (diff)
downloadcpython-c4ab11050d3efa7dd409a96d006435d282d5815e.zip
cpython-c4ab11050d3efa7dd409a96d006435d282d5815e.tar.gz
cpython-c4ab11050d3efa7dd409a96d006435d282d5815e.tar.bz2
Issue #18775: Add name and block_size attribute to HMAC object. They now
provide the same API elements as non-keyed cryptographic hash functions.
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/hmac.rst19
1 files changed, 19 insertions, 0 deletions
diff --git a/Doc/library/hmac.rst b/Doc/library/hmac.rst
index 8fa1435..2e9b0b2 100644
--- a/Doc/library/hmac.rst
+++ b/Doc/library/hmac.rst
@@ -79,6 +79,25 @@ An HMAC object has the following methods:
compute the digests of strings that share a common initial substring.
+A hash object has the following attributes:
+
+.. attribute:: HMAC.digest_size
+
+ The size of the resulting HMAC digest in bytes.
+
+.. attribute:: HMAC.block_size
+
+ The internal block size of the hash algorithm in bytes.
+
+ .. versionadded:: 3.4
+
+.. attribute:: HMAC.name
+
+ The canonical name of this HMAC, always lowercase, e.g. ``hmac-md5``.
+
+ .. versionadded:: 3.4
+
+
This module also provides the following helper function:
.. function:: compare_digest(a, b)