Changeset 391 for python/trunk/Doc/library/hmac.rst
- Timestamp:
- Mar 19, 2014, 11:31:01 PM (11 years ago)
- Location:
- python/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/trunk
-
Property svn:mergeinfo
set to
/python/vendor/Python-2.7.6 merged eligible /python/vendor/current merged eligible
-
Property svn:mergeinfo
set to
-
python/trunk/Doc/library/hmac.rst
r2 r391 1 2 1 :mod:`hmac` --- Keyed-Hashing for Message Authentication 3 2 ======================================================== … … 11 10 .. versionadded:: 2.2 12 11 12 **Source code:** :source:`Lib/hmac.py` 13 14 -------------- 15 13 16 This module implements the HMAC algorithm as described by :rfc:`2104`. 14 17 … … 18 21 Return a new hmac object. If *msg* is present, the method call ``update(msg)`` 19 22 is made. *digestmod* is the digest constructor or module for the HMAC object to 20 use. It defaults to the : func:`hashlib.md5` constructor.23 use. It defaults to the :data:`hashlib.md5` constructor. 21 24 22 .. note::23 24 The md5 hash has known weaknesses but remains the default for backwards25 compatibility. Choose a better one for your application.26 25 27 26 An HMAC object has the following methods: 28 27 29 30 .. method:: hmac.update(msg) 28 .. method:: HMAC.update(msg) 31 29 32 30 Update the hmac object with the string *msg*. Repeated calls are equivalent to … … 35 33 36 34 37 .. method:: hmac.digest()35 .. method:: HMAC.digest() 38 36 39 37 Return the digest of the strings passed to the :meth:`update` method so far. … … 42 40 43 41 44 .. method:: hmac.hexdigest()42 .. method:: HMAC.hexdigest() 45 43 46 44 Like :meth:`digest` except the digest is returned as a string twice the length … … 49 47 50 48 51 .. method:: hmac.copy()49 .. method:: HMAC.copy() 52 50 53 51 Return a copy ("clone") of the hmac object. This can be used to efficiently
Note:
See TracChangeset
for help on using the changeset viewer.