File: __init__.py

package info (click to toggle)
python-asyncssh 2.10.1-2%2Bdeb12u2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,252 kB
  • sloc: python: 36,288; makefile: 11
file content (55 lines) | stat: -rw-r--r-- 1,845 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Copyright (c) 2014-2021 by Ron Frederick <ronf@timeheart.net> and others.
#
# This program and the accompanying materials are made available under
# the terms of the Eclipse Public License v2.0 which accompanies this
# distribution and is available at:
#
#     http://www.eclipse.org/legal/epl-2.0/
#
# This program may also be made available under the following secondary
# licenses when the conditions for such availability set forth in the
# Eclipse Public License v2.0 are satisfied:
#
#    GNU General Public License, Version 2.0, or any later versions of
#    that license
#
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
#
# Contributors:
#     Ron Frederick - initial implementation, API, and documentation

"""A shim for accessing cryptographic primitives needed by asyncssh"""

from .cipher import BasicCipher, GCMCipher, register_cipher, get_cipher_params

from .dsa import DSAPrivateKey, DSAPublicKey

from .ec import ECDSAPrivateKey, ECDSAPublicKey, ECDH

from .ed import ed25519_available, ed448_available
from .ed import curve25519_available, curve448_available
from .ed import EdDSAPrivateKey, EdDSAPublicKey, Curve25519DH, Curve448DH

from .ec_params import lookup_ec_curve_by_params

from .kdf import pbkdf2_hmac

from .misc import CryptoKey, PyCAKey

from .rsa import RSAPrivateKey, RSAPublicKey

# Import chacha20-poly1305 cipher if available
from .chacha import ChachaCipher, chacha_available

# Import umac cryptographic hash if available
try:
    from .umac import umac32, umac64, umac96, umac128
except (ImportError, AttributeError, OSError): # pragma: no cover
    pass

# Import X.509 certificate support if available
try:
    from .x509 import X509Certificate, X509Name, X509NamePattern
    from .x509 import generate_x509_certificate, import_x509_certificate
except ImportError: # pragma: no cover
    pass