U
    ÒZjW
  ã                   @   sP   d dl Z d dlmZmZ d dlmZ G dd„ de jd�ZG dd„ de jd�ZdS )	é    N)ÚUnsupportedAlgorithmÚ_Reasons)Ú_serializationc                   @   sT   e Zd Zeed dœdd„ƒZejej	ej
edœdd„ƒZejeeddœd	d
„ƒZdS )ÚEd448PublicKey©ÚdataÚreturnc                 C   s*   ddl m} | ¡ s tdtjƒ‚| |¡S ©Nr   )Úbackendz2ed448 is not supported by this version of OpenSSL.)Ú,cryptography.hazmat.backends.openssl.backendr
   Úed448_supportedr   r   Ú UNSUPPORTED_PUBLIC_KEY_ALGORITHMZed448_load_public_bytes©Úclsr   r
   © r   úr/var/www/html/TRUCKING_PROJECT/venv/lib/python3.8/site-packages/cryptography/hazmat/primitives/asymmetric/ed448.pyÚfrom_public_bytes   s    þz Ed448PublicKey.from_public_bytes)ÚencodingÚformatr   c                 C   s   dS )z9
        The serialized bytes of the public key.
        Nr   )Úselfr   r   r   r   r   Úpublic_bytes   s    zEd448PublicKey.public_bytesN)Ú	signaturer   r   c                 C   s   dS )z'
        Verify the signature.
        Nr   )r   r   r   r   r   r   Úverify#   s    zEd448PublicKey.verify)Ú__name__Ú
__module__Ú__qualname__ÚclassmethodÚbytesr   ÚabcÚabstractmethodr   ÚEncodingZPublicFormatr   r   r   r   r   r   r      s   ü	r   )Ú	metaclassc                   @   s|   e Zd Zed dœdd„ƒZeed dœdd„ƒZeje	dœdd„ƒZ
ejeedœd	d
„ƒZejejejejedœdd„ƒZdS )ÚEd448PrivateKey)r   c                 C   s(   ddl m} | ¡ s tdtjƒ‚| ¡ S r	   )r   r
   r   r   r   r   Zed448_generate_key)r   r
   r   r   r   Úgenerate+   s    þzEd448PrivateKey.generater   c                 C   s*   ddl m} | ¡ s tdtjƒ‚| |¡S r	   )r   r
   r   r   r   r   Zed448_load_private_bytesr   r   r   r   Úfrom_private_bytes6   s    þz"Ed448PrivateKey.from_private_bytesc                 C   s   dS )zB
        The Ed448PublicKey derived from the private key.
        Nr   )r   r   r   r   Ú
public_keyB   s    zEd448PrivateKey.public_keyc                 C   s   dS )z!
        Signs the data.
        Nr   )r   r   r   r   r   ÚsignH   s    zEd448PrivateKey.sign)r   r   Úencryption_algorithmr   c                 C   s   dS )z:
        The serialized bytes of the private key.
        Nr   )r   r   r   r'   r   r   r   Úprivate_bytesN   s    zEd448PrivateKey.private_bytesN)r   r   r   r   r#   r   r$   r   r   r   r%   r&   r   r    ZPrivateFormatZKeySerializationEncryptionr(   r   r   r   r   r"   *   s   
ûr"   )	r   Zcryptography.exceptionsr   r   Zcryptography.hazmat.primitivesr   ÚABCMetar   r"   r   r   r   r   Ú<module>   s   