blob: 7f9ae347c9c7cadcb14fbe22e9be47a453b17af0 [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
28
Alex Gaynor3949f112013-11-02 16:57:10 -070029.. class:: UnsupportedAlgorithm
Alex Gaynorf1a3fc02013-11-02 14:03:34 -070030
31 This is raised when a backend doesn't support the requested algorithm (or
32 combination of algorithms).
Alex Gaynorb2774f52014-01-27 11:05:29 -080033
34
35.. class:: InvalidKey
36
Alex Gaynor288403a2014-01-27 15:59:17 -080037 This is raised when the verify method of a key derivation function's
38 computed key does not match the expected key.
Ayrxb5189af2014-02-13 18:52:31 +080039
40
41.. class:: InvalidToken
42
43 This is raised when the verify method of a one time password function's
44 computed token does not match the expected token.
Paul Kehrer4ccceaf2014-02-23 11:26:37 -060045
46
Paul Kehrer0377f5a2014-02-24 19:04:46 -060047.. class:: UnsupportedPadding
Paul Kehrer4ccceaf2014-02-23 11:26:37 -060048
Paul Kehrer0377f5a2014-02-24 19:04:46 -060049 This is raised when the chosen padding is not supported by the backend.