diff options
author | David Reid <dreid@dreid.org> | 2013-11-20 13:55:08 -0800 |
---|---|---|
committer | David Reid <dreid@dreid.org> | 2013-11-20 13:55:08 -0800 |
commit | 663295d015d4aa65258f14d91c6350726604350c (patch) | |
tree | 516710a9ca1992d64ed737e4e131f89e5c4ddae7 | |
parent | 63fa19ace98c2c88a6065acc9e944a71480ff651 (diff) | |
download | cryptography-663295d015d4aa65258f14d91c6350726604350c.tar.gz cryptography-663295d015d4aa65258f14d91c6350726604350c.tar.bz2 cryptography-663295d015d4aa65258f14d91c6350726604350c.zip |
Document all the parameters including cross references to specific providers where appropriate.
-rw-r--r-- | docs/hazmat/primitives/cryptographic-hashes.rst | 10 | ||||
-rw-r--r-- | docs/hazmat/primitives/hmac.rst | 10 | ||||
-rw-r--r-- | docs/hazmat/primitives/symmetric-encryption.rst | 14 |
3 files changed, 32 insertions, 2 deletions
diff --git a/docs/hazmat/primitives/cryptographic-hashes.rst b/docs/hazmat/primitives/cryptographic-hashes.rst index 92f8fa30..312d7e69 100644 --- a/docs/hazmat/primitives/cryptographic-hashes.rst +++ b/docs/hazmat/primitives/cryptographic-hashes.rst @@ -34,6 +34,14 @@ Message Digests upgrading the hash algorithm you use over time. For more information, see `Lifetimes of cryptographic hash functions`_. + :param algorithm: A + :class:`~cryptography.hazmat.primitives.interfaces.HashAlgorithm` + provider such as those described in + :ref:`below <cryptographic-hash-algorithms>`. + :param backend: A + :class:`~cryptography.hazmat.bindings.interfaces.HashBackend` + provider. + .. method:: update(data) :param bytes data: The bytes you wish to hash. @@ -60,6 +68,8 @@ Message Digests :return bytes: The message digest as bytes. +.. _cryptographic-hash-algorithms: + SHA-1 ~~~~~ diff --git a/docs/hazmat/primitives/hmac.rst b/docs/hazmat/primitives/hmac.rst index 10db40ee..db5e98d3 100644 --- a/docs/hazmat/primitives/hmac.rst +++ b/docs/hazmat/primitives/hmac.rst @@ -34,6 +34,16 @@ message. >>> h.finalize() '#F\xdaI\x8b"e\xc4\xf1\xbb\x9a\x8fc\xff\xf5\xdex.\xbc\xcd/+\x8a\x86\x1d\x84\'\xc3\xa6\x1d\xd8J' + + :param key: Secret key as ``bytes``. + :param algorithm: A + :class:`~cryptography.hazmat.primitives.interfaces.HashAlgorithm` + provider such as those described in + :ref:`Cryptographic Hashes <cryptographic-hash-algorithms>`. + :param backend: A + :class:`~cryptography.hazmat.bindings.interfaces.HMACBackend` + provider. + .. method:: update(msg) :param bytes msg: The bytes to hash and authenticate. diff --git a/docs/hazmat/primitives/symmetric-encryption.rst b/docs/hazmat/primitives/symmetric-encryption.rst index 76f68a12..f63ad90a 100644 --- a/docs/hazmat/primitives/symmetric-encryption.rst +++ b/docs/hazmat/primitives/symmetric-encryption.rst @@ -44,8 +44,16 @@ an "encrypt-then-MAC" formulation as `described by Colin Percival`_. >>> decryptor.update(ct) + decryptor.finalize() 'a secret message' - :param algorithms: One of the algorithms described below. - :param mode: One of the modes described below. + :param algorithms: A + :class:`~cryptography.hazmat.primitives.interfaces.CipherAlgorithm` + provider such as those described + :ref:`below <symmetric-encryption-algorithms>`. + :param mode: A :class:`~cryptography.hazmat.primitives.interfaces.Mode` + provider such as those described + :ref:`below <symmetric-encryption-modes>`. + :param backend: A + :class:`~cryptography.hazmat.bindings.interfaces.CipherBackend` + provider. .. method:: encryptor() @@ -98,6 +106,8 @@ an "encrypt-then-MAC" formulation as `described by Colin Percival`_. :meth:`update` and :meth:`finalize` will raise :class:`~cryptography.exceptions.AlreadyFinalized`. +.. _symmetric-encryption-algorithms: + Algorithms ~~~~~~~~~~ |