summaryrefslogtreecommitdiffstats
path: root/Doc/library/hmac.rst
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2013-11-20 16:23:06 (GMT)
committerChristian Heimes <christian@cheimes.de>2013-11-20 16:23:06 (GMT)
commit634919a9fa1fffe3d36b13b4248f99508b5999ed (patch)
treeb60c9ca7e04ad97e11385712b3405fc9b42d7803 /Doc/library/hmac.rst
parent7f48396cb5d19a40f571b0aec4916612f117a13d (diff)
downloadcpython-634919a9fa1fffe3d36b13b4248f99508b5999ed.zip
cpython-634919a9fa1fffe3d36b13b4248f99508b5999ed.tar.gz
cpython-634919a9fa1fffe3d36b13b4248f99508b5999ed.tar.bz2
Issue #17276: MD5 as default digestmod for HMAC is deprecated. The HMAC
module supports digestmod names, e.g. hmac.HMAC('sha1').
Diffstat (limited to 'Doc/library/hmac.rst')
-rw-r--r--Doc/library/hmac.rst11
1 files changed, 9 insertions, 2 deletions
diff --git a/Doc/library/hmac.rst b/Doc/library/hmac.rst
index 1d928ea..8fa1435 100644
--- a/Doc/library/hmac.rst
+++ b/Doc/library/hmac.rst
@@ -18,13 +18,20 @@ This module implements the HMAC algorithm as described by :rfc:`2104`.
Return a new hmac object. *key* is a bytes or bytearray object giving the
secret key. If *msg* is present, the method call ``update(msg)`` is made.
- *digestmod* is the digest constructor or module for the HMAC object to use.
- It defaults to the :data:`hashlib.md5` constructor.
+ *digestmod* is the digest name, digest constructor or module for the HMAC
+ object to use. It supports any name suitable to :func:`hashlib.new` and
+ defaults to the :data:`hashlib.md5` constructor.
.. versionchanged:: 3.4
Parameter *key* can be a bytes or bytearray object. Parameter *msg* can
be of any type supported by :mod:`hashlib`.
+ Paramter *digestmod* can be the name of a hash algorithm.
+
+ .. deprecated:: 3.4
+ MD5 as implicit default digest for *digestmod* is deprecated.
+
+
An HMAC object has the following methods:
.. method:: HMAC.update(msg)