Alex Gaynor | f1a3fc0 | 2013-11-02 14:03:34 -0700 | [diff] [blame] | 1 | Exceptions |
| 2 | ========== |
| 3 | |
| 4 | .. currentmodule:: cryptography.exceptions |
| 5 | |
David Reid | 6392a9c | 2013-11-13 10:01:15 -0800 | [diff] [blame] | 6 | .. class:: AlreadyFinalized |
| 7 | |
David Reid | 00fb12a | 2013-11-13 13:02:44 -0800 | [diff] [blame] | 8 | This is raised when a context is used after being finalized. |
David Reid | 6392a9c | 2013-11-13 10:01:15 -0800 | [diff] [blame] | 9 | |
Paul Kehrer | ce9c611 | 2013-11-22 14:10:59 -0600 | [diff] [blame] | 10 | |
Julian Krause | c91fe6a | 2013-12-25 11:00:49 -0800 | [diff] [blame] | 11 | .. class:: InvalidSignature |
| 12 | |
Paul Kehrer | 42b3713 | 2014-02-23 19:13:19 -0600 | [diff] [blame] | 13 | This is raised when signature verification fails. This can occur with |
| 14 | HMAC or asymmetric key signature validation. |
Julian Krause | c91fe6a | 2013-12-25 11:00:49 -0800 | [diff] [blame] | 15 | |
| 16 | |
Paul Kehrer | ce9c611 | 2013-11-22 14:10:59 -0600 | [diff] [blame] | 17 | .. class:: NotYetFinalized |
Paul Kehrer | 22e80cb | 2013-11-20 21:27:00 -0600 | [diff] [blame] | 18 | |
| 19 | This is raised when the AEAD tag property is accessed on a context |
| 20 | before it is finalized. |
| 21 | |
David Reid | 6392a9c | 2013-11-13 10:01:15 -0800 | [diff] [blame] | 22 | |
Paul Kehrer | ce9c611 | 2013-11-22 14:10:59 -0600 | [diff] [blame] | 23 | .. class:: AlreadyUpdated |
| 24 | |
| 25 | This is raised when additional data is added to a context after update |
| 26 | has already been called. |
| 27 | |
Alex Gaynor | c6a6f31 | 2014-03-06 14:22:56 -0800 | [diff] [blame] | 28 | .. class:: UnsupportedCipher |
Paul Kehrer | ce9c611 | 2013-11-22 14:10:59 -0600 | [diff] [blame] | 29 | |
Alex Gaynor | c6a6f31 | 2014-03-06 14:22:56 -0800 | [diff] [blame] | 30 | .. versionadded:: 0.3 |
Alex Gaynor | f1a3fc0 | 2013-11-02 14:03:34 -0700 | [diff] [blame] | 31 | |
Alex Gaynor | c6a6f31 | 2014-03-06 14:22:56 -0800 | [diff] [blame] | 32 | This is raised when a backend doesn't support the requested cipher |
| 33 | algorithm and mode combination. |
| 34 | |
| 35 | .. class:: UnsupportedHash |
| 36 | |
| 37 | .. versionadded:: 0.3 |
| 38 | |
| 39 | This is raised when a backend doesn't support the requested hash algorithm. |
| 40 | |
| 41 | .. class:: UnsupportedPadding |
| 42 | |
| 43 | .. versionadded:: 0.3 |
| 44 | |
| 45 | This is raised when the requested padding is not supported by the backend. |
Alex Gaynor | b2774f5 | 2014-01-27 11:05:29 -0800 | [diff] [blame] | 46 | |
| 47 | |
| 48 | .. class:: InvalidKey |
| 49 | |
Alex Gaynor | 288403a | 2014-01-27 15:59:17 -0800 | [diff] [blame] | 50 | This is raised when the verify method of a key derivation function's |
| 51 | computed key does not match the expected key. |
Ayrx | b5189af | 2014-02-13 18:52:31 +0800 | [diff] [blame] | 52 | |
| 53 | |
| 54 | .. class:: InvalidToken |
| 55 | |
| 56 | This is raised when the verify method of a one time password function's |
| 57 | computed token does not match the expected token. |
Paul Kehrer | 4ccceaf | 2014-02-23 11:26:37 -0600 | [diff] [blame] | 58 | |
Ayrx | 30e574e | 2014-03-15 21:51:04 +0800 | [diff] [blame^] | 59 | .. class:: UnsupportedInterface |
| 60 | |
| 61 | .. versionadded:: 0.3 |
| 62 | |
| 63 | This is raised when the provided backend does not support the required |
| 64 | interface. |