From 34511c697f6f17915b5fe5a58214bb38d779f4a8 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Wed, 13 Nov 2013 13:30:30 -0800 Subject: Use AlreadyFinalized for symmetric ciphers --- docs/hazmat/primitives/symmetric-encryption.rst | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'docs/hazmat') diff --git a/docs/hazmat/primitives/symmetric-encryption.rst b/docs/hazmat/primitives/symmetric-encryption.rst index 28b143ba..950ea8b0 100644 --- a/docs/hazmat/primitives/symmetric-encryption.rst +++ b/docs/hazmat/primitives/symmetric-encryption.rst @@ -79,6 +79,7 @@ an "encrypt-then-MAC" formulation as `described by Colin Percival`_. :param bytes data: The data you wish to pass into the context. :return bytes: Returns the data that was encrypted or decrypted. + :raises cryptography.exceptions.AlreadyFinalized: See :meth:`finalize` When the ``Cipher`` was constructed in a mode that turns it into a stream cipher (e.g. @@ -90,6 +91,10 @@ an "encrypt-then-MAC" formulation as `described by Colin Percival`_. :return bytes: Returns the remainder of the data. + Once ``finalize`` is called this object can no longer be used and + :meth:`update` will raise + :class:`~cryptography.exceptions.AlreadyFinalized`. + Algorithms ~~~~~~~~~~ -- cgit v1.2.3 From 9b70ba37ff66e18b67efd0f7d196becc77763c41 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Wed, 13 Nov 2013 13:49:43 -0800 Subject: Also mention finalize --- docs/hazmat/primitives/symmetric-encryption.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/hazmat') diff --git a/docs/hazmat/primitives/symmetric-encryption.rst b/docs/hazmat/primitives/symmetric-encryption.rst index 950ea8b0..4ef15459 100644 --- a/docs/hazmat/primitives/symmetric-encryption.rst +++ b/docs/hazmat/primitives/symmetric-encryption.rst @@ -92,7 +92,7 @@ an "encrypt-then-MAC" formulation as `described by Colin Percival`_. :return bytes: Returns the remainder of the data. Once ``finalize`` is called this object can no longer be used and - :meth:`update` will raise + :meth:`update` and :meth:`finalize` will raise :class:`~cryptography.exceptions.AlreadyFinalized`. Algorithms -- cgit v1.2.3 From 272d537b90af00e5e5153f3818aee7ffe1df4f65 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Wed, 13 Nov 2013 13:50:02 -0800 Subject: Here too --- docs/hazmat/primitives/cryptographic-hashes.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/hazmat') diff --git a/docs/hazmat/primitives/cryptographic-hashes.rst b/docs/hazmat/primitives/cryptographic-hashes.rst index 525fd889..52e87702 100644 --- a/docs/hazmat/primitives/cryptographic-hashes.rst +++ b/docs/hazmat/primitives/cryptographic-hashes.rst @@ -53,7 +53,7 @@ Message Digests Finalize the current context and return the message digest as bytes. Once ``finalize`` is called this object can no longer be used and - :meth:`update` and :meth:`copy` will raise + :meth:`update`, :meth:`copy`, and :meth:`finalize` will raise :class:`~cryptography.exceptions.AlreadyFinalized`. :return bytes: The message digest as bytes. -- cgit v1.2.3