From f1a3fc03dc7cecc7658620f342dfd7cf6bb98ba0 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Sat, 2 Nov 2013 14:03:34 -0700 Subject: Document and implement the public API for when the backend doesn't support the requested algorithm --- docs/exceptions.rst | 9 +++++++++ docs/hazmat/primitives/symmetric-encryption.rst | 9 +++++++++ docs/index.rst | 1 + 3 files changed, 19 insertions(+) create mode 100644 docs/exceptions.rst (limited to 'docs') diff --git a/docs/exceptions.rst b/docs/exceptions.rst new file mode 100644 index 00000000..b391e620 --- /dev/null +++ b/docs/exceptions.rst @@ -0,0 +1,9 @@ +Exceptions +========== + +.. currentmodule:: cryptography.exceptions + +.. class:: NoSuchAlgorithm + + This is raised when a backend doesn't support the requested algorithm (or + combination of algorithms). diff --git a/docs/hazmat/primitives/symmetric-encryption.rst b/docs/hazmat/primitives/symmetric-encryption.rst index b8b1c839..48bad928 100644 --- a/docs/hazmat/primitives/symmetric-encryption.rst +++ b/docs/hazmat/primitives/symmetric-encryption.rst @@ -42,12 +42,21 @@ where the encrypter and decrypter both use the same key. :class:`~cryptography.hazmat.primitives.interfaces.CipherContext` provider. + If the backend doesn't support the requested combination of ``cipher`` + and ``mode`` a :class:`cryptography.exceptions.NoSuchAlgorithm` will + be raised. + .. method:: decryptor() :return: A decrypting :class:`~cryptography.hazmat.primitives.interfaces.CipherContext` provider. + If the backend doesn't support the requested combination of ``cipher`` + and ``mode`` a :class:`cryptography.exceptions.NoSuchAlgorithm` will + be raised. + + .. currentmodule:: cryptography.hazmat.primitives.interfaces .. class:: CipherContext diff --git a/docs/index.rst b/docs/index.rst index 4fd5d3be..eb30b5dd 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -31,6 +31,7 @@ Contents :maxdepth: 2 architecture + exceptions contributing security community -- cgit v1.2.3