File: __init__.py

package info (click to toggle)
python-jose 3.3.0%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 528 kB
  • sloc: python: 4,020; makefile: 162; sh: 6
file content (32 lines) | stat: -rw-r--r-- 1,091 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
try:
    from jose.backends.cryptography_backend import get_random_bytes  # noqa: F401
except ImportError:
    try:
        from jose.backends.pycrypto_backend import get_random_bytes  # noqa: F401
    except ImportError:
        from jose.backends.native import get_random_bytes  # noqa: F401

try:
    from jose.backends.cryptography_backend import CryptographyRSAKey as RSAKey  # noqa: F401
except ImportError:
    try:
        from jose.backends.rsa_backend import RSAKey  # noqa: F401
    except ImportError:
        RSAKey = None

try:
    from jose.backends.cryptography_backend import CryptographyECKey as ECKey  # noqa: F401
except ImportError:
    from jose.backends.ecdsa_backend import ECDSAECKey as ECKey  # noqa: F401

try:
    from jose.backends.cryptography_backend import CryptographyAESKey as AESKey  # noqa: F401
except ImportError:
    AESKey = None

try:
    from jose.backends.cryptography_backend import CryptographyHMACKey as HMACKey  # noqa: F401
except ImportError:
    from jose.backends.native import HMACKey  # noqa: F401

from .base import DIRKey  # noqa: F401