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/hazmat/primitives/symmetric-encryption.rst | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'docs/hazmat') 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 -- cgit v1.2.3 From 3949f1171084c2e1cfe43f638857ea0e0f8f246d Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Sat, 2 Nov 2013 16:57:10 -0700 Subject: Changed excpetion name based on feedback from dreid --- docs/hazmat/primitives/symmetric-encryption.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'docs/hazmat') diff --git a/docs/hazmat/primitives/symmetric-encryption.rst b/docs/hazmat/primitives/symmetric-encryption.rst index 48bad928..c1c8d247 100644 --- a/docs/hazmat/primitives/symmetric-encryption.rst +++ b/docs/hazmat/primitives/symmetric-encryption.rst @@ -43,8 +43,8 @@ where the encrypter and decrypter both use the same key. provider. If the backend doesn't support the requested combination of ``cipher`` - and ``mode`` a :class:`cryptography.exceptions.NoSuchAlgorithm` will - be raised. + and ``mode`` an :class:`cryptography.exceptions.UnsupportedAlgorithm` + will be raised. .. method:: decryptor() @@ -53,8 +53,8 @@ where the encrypter and decrypter both use the same key. provider. If the backend doesn't support the requested combination of ``cipher`` - and ``mode`` a :class:`cryptography.exceptions.NoSuchAlgorithm` will - be raised. + and ``mode`` an :class:`cryptography.exceptions.UnsupportedAlgorithm` + will be raised. .. currentmodule:: cryptography.hazmat.primitives.interfaces -- cgit v1.2.3