blob: 48c4bca88c2168ff57338de0455fb0ca289384d2 [file] [log] [blame]
Alex Gaynorf1a3fc02013-11-02 14:03:34 -07001Exceptions
2==========
3
4.. currentmodule:: cryptography.exceptions
5
David Reid6392a9c2013-11-13 10:01:15 -08006.. class:: AlreadyFinalized
7
David Reid00fb12a2013-11-13 13:02:44 -08008 This is raised when a context is used after being finalized.
David Reid6392a9c2013-11-13 10:01:15 -08009
Paul Kehrerce9c6112013-11-22 14:10:59 -060010
Julian Krausec91fe6a2013-12-25 11:00:49 -080011.. class:: InvalidSignature
12
Paul Kehrer42b37132014-02-23 19:13:19 -060013 This is raised when signature verification fails. This can occur with
14 HMAC or asymmetric key signature validation.
Julian Krausec91fe6a2013-12-25 11:00:49 -080015
16
Paul Kehrerce9c6112013-11-22 14:10:59 -060017.. class:: NotYetFinalized
Paul Kehrer22e80cb2013-11-20 21:27:00 -060018
19 This is raised when the AEAD tag property is accessed on a context
20 before it is finalized.
21
David Reid6392a9c2013-11-13 10:01:15 -080022
Paul Kehrerce9c6112013-11-22 14:10:59 -060023.. class:: AlreadyUpdated
24
25 This is raised when additional data is added to a context after update
26 has already been called.
27
Alex Gaynorc6a6f312014-03-06 14:22:56 -080028.. class:: UnsupportedCipher
Paul Kehrerce9c6112013-11-22 14:10:59 -060029
Alex Gaynorc6a6f312014-03-06 14:22:56 -080030 .. versionadded:: 0.3
Alex Gaynorf1a3fc02013-11-02 14:03:34 -070031
Alex Gaynorc6a6f312014-03-06 14:22:56 -080032 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 Gaynorb2774f52014-01-27 11:05:29 -080046
47
48.. class:: InvalidKey
49
Alex Gaynor288403a2014-01-27 15:59:17 -080050 This is raised when the verify method of a key derivation function's
51 computed key does not match the expected key.
Ayrxb5189af2014-02-13 18:52:31 +080052
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 Kehrer4ccceaf2014-02-23 11:26:37 -060058