Common¶
Functions¶
- jwcrypto.common.base64url_encode(payload)¶
- jwcrypto.common.base64url_decode(payload)¶
- jwcrypto.common.json_encode(string)¶
- jwcrypto.common.json_decode(string)¶
Classes¶
- class jwcrypto.common.JWSEHeaderRegistry(init_registry=None)¶
Exceptions¶
- class jwcrypto.common.JWException¶
- class jwcrypto.common.InvalidJWAAlgorithm(message=None)¶
Bases:
JWException
- class jwcrypto.common.InvalidCEKeyLength(expected, obtained)¶
Bases:
JWException
Invalid CEK Key Length.
This exception is raised when a Content Encryption Key does not match the required length.
- class jwcrypto.common.InvalidJWEOperation(message=None, exception=None)¶
Bases:
JWException
Invalid JWS Object.
This exception is raised when a requested operation cannot be execute due to unsatisfied conditions.
- class jwcrypto.common.InvalidJWEKeyType(expected, obtained)¶
Bases:
JWException
Invalid JWE Key Type.
This exception is raised when the provided JWK Key does not match the type required by the specified algorithm.
- class jwcrypto.common.InvalidJWEKeyLength(expected, obtained)¶
Bases:
JWException
Invalid JWE Key Length.
This exception is raised when the provided JWK Key does not match the length required by the specified algorithm.
- class jwcrypto.common.InvalidJWSERegOperation(message=None, exception=None)¶
Bases:
JWException
Invalid JWSE Header Registry Operation.
This exception is raised when there is an error in trying to add a JW Signature or Encryption header to the Registry.
- class jwcrypto.common.JWKeyNotFound(message=None)¶
Bases:
JWException
The key needed to complete the operation was not found.
This exception is raised when a JWKSet is used to perform some operation and the key required to successfully complete the operation is not found.