From: Georg Brandl Date: Sun, 6 Oct 2013 07:49:18 +0000 (+0200) Subject: merge with 3.3 X-Git-Tag: v3.4.0a4~263 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=808ddaa3ecc383fca740c6ec2b640c91678d7a59;p=thirdparty%2FPython%2Fcpython.git merge with 3.3 --- 808ddaa3ecc383fca740c6ec2b640c91678d7a59 diff --cc Doc/library/hmac.rst index 4c707e950be8,95756933d185..1d928ea86002 --- a/Doc/library/hmac.rst +++ b/Doc/library/hmac.rst @@@ -16,14 -16,11 +16,14 @@@ This module implements the HMAC algorit .. function:: new(key, msg=None, digestmod=None) - Return a new hmac object. *key* is a bytes 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. + 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 :func:`hashlib.md5` constructor. ++ It 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`. An HMAC object has the following methods: