|
2 | 2 | import warnings |
3 | 3 |
|
4 | 4 | import six |
5 | | - |
6 | | -from .base import Key |
7 | | -from ..utils import base64_to_long, long_to_base64, base64url_decode, base64url_encode |
8 | | -from ..constants import ALGORITHMS |
9 | | -from ..exceptions import JWKError, JWEError |
10 | | - |
11 | 5 | from cryptography.exceptions import InvalidSignature, InvalidTag |
12 | 6 | from cryptography.hazmat.backends import default_backend |
13 | 7 | from cryptography.hazmat.bindings.openssl.binding import Binding |
14 | | -from cryptography.hazmat.primitives import hashes, serialization, hmac |
15 | | -from cryptography.hazmat.primitives.asymmetric import ec, rsa, padding |
16 | | -from cryptography.hazmat.primitives.asymmetric.utils import decode_dss_signature, encode_dss_signature |
17 | | -from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, aead, modes |
18 | | -from cryptography.hazmat.primitives.keywrap import aes_key_wrap, aes_key_unwrap, InvalidUnwrap |
| 8 | +from cryptography.hazmat.primitives import hashes, hmac, serialization |
| 9 | +from cryptography.hazmat.primitives.asymmetric import ec, padding, rsa |
| 10 | +from cryptography.hazmat.primitives.asymmetric.utils import ( |
| 11 | + decode_dss_signature, encode_dss_signature) |
| 12 | +from cryptography.hazmat.primitives.ciphers import (Cipher, aead, algorithms, |
| 13 | + modes) |
| 14 | +from cryptography.hazmat.primitives.keywrap import (InvalidUnwrap, |
| 15 | + aes_key_unwrap, |
| 16 | + aes_key_wrap) |
19 | 17 | from cryptography.hazmat.primitives.padding import PKCS7 |
20 | | -from cryptography.hazmat.primitives.serialization import load_pem_private_key, load_pem_public_key |
| 18 | +from cryptography.hazmat.primitives.serialization import (load_pem_private_key, |
| 19 | + load_pem_public_key) |
21 | 20 | from cryptography.utils import int_to_bytes |
22 | 21 | from cryptography.x509 import load_pem_x509_certificate |
23 | 22 |
|
| 23 | +from ..constants import ALGORITHMS |
| 24 | +from ..exceptions import JWEError, JWKError |
| 25 | +from ..utils import (base64_to_long, base64url_decode, base64url_encode, |
| 26 | + long_to_base64) |
| 27 | +from .base import Key |
| 28 | + |
24 | 29 | _binding = None |
25 | 30 |
|
26 | 31 |
|
|
0 commit comments