File: __init__.py

package info (click to toggle)
python-authlib 1.6.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,016 kB
  • sloc: python: 26,998; makefile: 53; sh: 14
file content (39 lines) | stat: -rw-r--r-- 963 bytes parent folder | download | duplicates (2)
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
33
34
35
36
37
38
39
from .ec_key import ECKey
from .jwe_algs import JWE_ALG_ALGORITHMS
from .jwe_algs import AESAlgorithm
from .jwe_algs import ECDHESAlgorithm
from .jwe_algs import u32be_len_input
from .jwe_encs import JWE_ENC_ALGORITHMS
from .jwe_encs import CBCHS2EncAlgorithm
from .jwe_zips import DeflateZipAlgorithm
from .jws_algs import JWS_ALGORITHMS
from .oct_key import OctKey
from .rsa_key import RSAKey


def register_jws_rfc7518(cls):
    for algorithm in JWS_ALGORITHMS:
        cls.register_algorithm(algorithm)


def register_jwe_rfc7518(cls):
    for algorithm in JWE_ALG_ALGORITHMS:
        cls.register_algorithm(algorithm)

    for algorithm in JWE_ENC_ALGORITHMS:
        cls.register_algorithm(algorithm)

    cls.register_algorithm(DeflateZipAlgorithm())


__all__ = [
    "register_jws_rfc7518",
    "register_jwe_rfc7518",
    "OctKey",
    "RSAKey",
    "ECKey",
    "u32be_len_input",
    "AESAlgorithm",
    "ECDHESAlgorithm",
    "CBCHS2EncAlgorithm",
]