Alex Gaynor | f1a3fc0 | 2013-11-02 14:03:34 -0700 | [diff] [blame] | 1 | Exceptions |
| 2 | ========== |
| 3 | |
| 4 | .. currentmodule:: cryptography.exceptions |
| 5 | |
Alex Gaynor | 7a489db | 2014-03-22 15:09:34 -0700 | [diff] [blame] | 6 | |
| 7 | .. class:: UnsupportedAlgorithm |
| 8 | |
| 9 | Raised when the requested algorithm, or combination of algorithms is not |
| 10 | supported. |
| 11 | |
| 12 | |
David Reid | 6392a9c | 2013-11-13 10:01:15 -0800 | [diff] [blame] | 13 | .. class:: AlreadyFinalized |
| 14 | |
David Reid | 00fb12a | 2013-11-13 13:02:44 -0800 | [diff] [blame] | 15 | This is raised when a context is used after being finalized. |
David Reid | 6392a9c | 2013-11-13 10:01:15 -0800 | [diff] [blame] | 16 | |
Paul Kehrer | ce9c611 | 2013-11-22 14:10:59 -0600 | [diff] [blame] | 17 | |
Julian Krause | c91fe6a | 2013-12-25 11:00:49 -0800 | [diff] [blame] | 18 | .. class:: InvalidSignature |
| 19 | |
Paul Kehrer | 42b3713 | 2014-02-23 19:13:19 -0600 | [diff] [blame] | 20 | This is raised when signature verification fails. This can occur with |
| 21 | HMAC or asymmetric key signature validation. |
Julian Krause | c91fe6a | 2013-12-25 11:00:49 -0800 | [diff] [blame] | 22 | |
| 23 | |
Paul Kehrer | ce9c611 | 2013-11-22 14:10:59 -0600 | [diff] [blame] | 24 | .. class:: NotYetFinalized |
Paul Kehrer | 22e80cb | 2013-11-20 21:27:00 -0600 | [diff] [blame] | 25 | |
| 26 | This is raised when the AEAD tag property is accessed on a context |
| 27 | before it is finalized. |
| 28 | |
David Reid | 6392a9c | 2013-11-13 10:01:15 -0800 | [diff] [blame] | 29 | |
Paul Kehrer | ce9c611 | 2013-11-22 14:10:59 -0600 | [diff] [blame] | 30 | .. class:: AlreadyUpdated |
| 31 | |
| 32 | This is raised when additional data is added to a context after update |
| 33 | has already been called. |
| 34 | |
Alex Gaynor | b2774f5 | 2014-01-27 11:05:29 -0800 | [diff] [blame] | 35 | |
| 36 | .. class:: InvalidKey |
| 37 | |
Alex Gaynor | 288403a | 2014-01-27 15:59:17 -0800 | [diff] [blame] | 38 | This is raised when the verify method of a key derivation function's |
| 39 | computed key does not match the expected key. |
Ayrx | b5189af | 2014-02-13 18:52:31 +0800 | [diff] [blame] | 40 | |
| 41 | |
| 42 | .. class:: InvalidToken |
| 43 | |
| 44 | This is raised when the verify method of a one time password function's |
| 45 | computed token does not match the expected token. |