ACIL FM
Dark
Refresh
Current DIR:
/usr/lib64/python3.9/site-packages/cryptography/hazmat/primitives/asymmetric
/
usr
lib64
python3.9
site-packages
cryptography
hazmat
primitives
asymmetric
Upload
Zip Selected
Delete Selected
Pilih semua
Nama
Ukuran
Permission
Aksi
__pycache__
-
chmod
Open
Rename
Delete
dh.py
6.42 MB
chmod
View
DL
Edit
Rename
Delete
dsa.py
8.21 MB
chmod
View
DL
Edit
Rename
Delete
ec.py
14.67 MB
chmod
View
DL
Edit
Rename
Delete
ed448.py
2.58 MB
chmod
View
DL
Edit
Rename
Delete
ed25519.py
2.66 MB
chmod
View
DL
Edit
Rename
Delete
padding.py
2.09 MB
chmod
View
DL
Edit
Rename
Delete
rsa.py
11.53 MB
chmod
View
DL
Edit
Rename
Delete
types.py
896 B
chmod
View
DL
Edit
Rename
Delete
utils.py
742 B
chmod
View
DL
Edit
Rename
Delete
x448.py
2.5 MB
chmod
View
DL
Edit
Rename
Delete
x25519.py
2.53 MB
chmod
View
DL
Edit
Rename
Delete
__init__.py
956 B
chmod
View
DL
Edit
Rename
Delete
Edit file: /usr/lib64/python3.9/site-packages/cryptography/hazmat/primitives/asymmetric/ed25519.py
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. import abc from cryptography.exceptions import UnsupportedAlgorithm, _Reasons from cryptography.hazmat.primitives import _serialization _ED25519_KEY_SIZE = 32 _ED25519_SIG_SIZE = 64 class Ed25519PublicKey(metaclass=abc.ABCMeta): @classmethod def from_public_bytes(cls, data: bytes) -> "Ed25519PublicKey": from cryptography.hazmat.backends.openssl.backend import backend if not backend.ed25519_supported(): raise UnsupportedAlgorithm( "ed25519 is not supported by this version of OpenSSL.", _Reasons.UNSUPPORTED_PUBLIC_KEY_ALGORITHM, ) return backend.ed25519_load_public_bytes(data) @abc.abstractmethod def public_bytes( self, encoding: _serialization.Encoding, format: _serialization.PublicFormat, ) -> bytes: """ The serialized bytes of the public key. """ @abc.abstractmethod def verify(self, signature: bytes, data: bytes) -> None: """ Verify the signature. """ class Ed25519PrivateKey(metaclass=abc.ABCMeta): @classmethod def generate(cls) -> "Ed25519PrivateKey": from cryptography.hazmat.backends.openssl.backend import backend if not backend.ed25519_supported(): raise UnsupportedAlgorithm( "ed25519 is not supported by this version of OpenSSL.", _Reasons.UNSUPPORTED_PUBLIC_KEY_ALGORITHM, ) return backend.ed25519_generate_key() @classmethod def from_private_bytes(cls, data: bytes) -> "Ed25519PrivateKey": from cryptography.hazmat.backends.openssl.backend import backend if not backend.ed25519_supported(): raise UnsupportedAlgorithm( "ed25519 is not supported by this version of OpenSSL.", _Reasons.UNSUPPORTED_PUBLIC_KEY_ALGORITHM, ) return backend.ed25519_load_private_bytes(data) @abc.abstractmethod def public_key(self) -> Ed25519PublicKey: """ The Ed25519PublicKey derived from the private key. """ @abc.abstractmethod def private_bytes( self, encoding: _serialization.Encoding, format: _serialization.PrivateFormat, encryption_algorithm: _serialization.KeySerializationEncryption, ) -> bytes: """ The serialized bytes of the private key. """ @abc.abstractmethod def sign(self, data: bytes) -> bytes: """ Signs the data. """
Simpan
Batal
Isi Zip:
Unzip
Create
Buat Folder
Buat File
Terminal / Execute
Run
Chmod Bulk
All File
All Folder
All File dan Folder
Apply