aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2013-10-28 11:06:55 -0500
committerPaul Kehrer <paul.l.kehrer@gmail.com>2013-10-28 17:36:50 -0500
commit2824ab72d30e8423d17496e2c3baa47106505c8c (patch)
tree49f1e87ceb6d3f8a387231cf1a81cb444ee94ee6 /docs
parent1bb8b710d444012b7218a08f098a85c4a31ca1bc (diff)
downloadcryptography-2824ab72d30e8423d17496e2c3baa47106505c8c.tar.gz
cryptography-2824ab72d30e8423d17496e2c3baa47106505c8c.tar.bz2
cryptography-2824ab72d30e8423d17496e2c3baa47106505c8c.zip
make hmac (mostly) compatible with stdlib hmac
Diffstat (limited to 'docs')
-rw-r--r--docs/hazmat/primitives/hmac.rst10
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/hazmat/primitives/hmac.rst b/docs/hazmat/primitives/hmac.rst
index 47b88030..76b7e24c 100644
--- a/docs/hazmat/primitives/hmac.rst
+++ b/docs/hazmat/primitives/hmac.rst
@@ -18,23 +18,23 @@ message authentication codes using a cryptographic hash function coupled with a
secret key. You can use an HMAC to verify integrity as well as authenticate a
message.
-.. class:: cryptography.primitives.hmac.HMAC(key, hash_cls, data=None)
+.. class:: cryptography.primitives.hmac.HMAC(key, msg=None, digestmod=None)
HMAC objects take a ``key``, a hash class derived from :class:`~cryptography.primitives.hashes.BaseHash`,
- and optional initial data. The ``key`` should be randomly generated bytes and
+ and optional msg. The ``key`` should be randomly generated bytes and
the length of the ``block_size`` of the hash. You must keep the ``key`` secret.
.. doctest::
>>> from cryptography.primitives import hashes, hmac
- >>> h = hmac.HMAC(key, hashes.SHA256)
+ >>> h = hmac.HMAC(key, digestmod=hashes.SHA256)
>>> h.update(b"message to hash")
>>> h.hexdigest()
'...'
- .. method:: update(data)
+ .. method:: update(msg)
- :param bytes data: The bytes you wish to hash.
+ :param bytes msg The bytes you wish to hash.
.. method:: copy()