U
    ʹh                     @  s   d dl mZ d dlZd dlmZmZ d dlmZ d dl	m
Z
 d dlmZ G dd dejd	Zeed
rteejj G dd dejd	Zeedreejj dS )    )annotationsN)UnsupportedAlgorithm_Reasons)openssl)_serialization)Bufferc                   @  s   e Zd Zedd dddZejdddddd	Zejdd
ddZejddddddZ	ejdddddZ
ejd d
ddZdS )Ed448PublicKeybytesdatareturnc                 C  s,   ddl m} | s tdtjtj|S Nr   )backendz2ed448 is not supported by this version of OpenSSL.)	,cryptography.hazmat.backends.openssl.backendr   ed448_supportedr   r    UNSUPPORTED_PUBLIC_KEY_ALGORITHMrust_openssled448from_public_bytesclsr   r    r   U./venv/lib/python3.8/site-packages/cryptography/hazmat/primitives/asymmetric/ed448.pyr      s    z Ed448PublicKey.from_public_bytes_serialization.Encodingz_serialization.PublicFormat)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_bytesr   c                 C  s   dS )z`
        The raw bytes of the public key.
        Equivalent to public_bytes(Raw, Raw).
        Nr   r   r   r   r   public_bytes_raw&   s    zEd448PublicKey.public_bytes_rawr   None)	signaturer   r   c                 C  s   dS )z'
        Verify the signature.
        Nr   )r   r"   r   r   r   r   verify-   s    zEd448PublicKey.verifyobjectbool)otherr   c                 C  s   dS )z"
        Checks equality.
        Nr   )r   r&   r   r   r   __eq__3   s    zEd448PublicKey.__eq__c                 C  s   dS z!
        Returns a copy.
        Nr   r   r   r   r   __copy__9   s    zEd448PublicKey.__copy__N)__name__
__module____qualname__classmethodr   abcabstractmethodr   r    r#   r'   r)   r   r   r   r   r      s   	r   )	metaclassr   c                   @  s   e Zd Zed dddZedd dddZejddd	d
ZejdddddZ	ejdddddddZ
ejddddZejd dddZdS )Ed448PrivateKeyr   c                 C  s*   ddl m} | s tdtjtj S r   )	r   r   r   r   r   r   r   r   Zgenerate_key)r   r   r   r   r   generateE   s    zEd448PrivateKey.generater   r
   c                 C  s,   ddl m} | s tdtjtj|S r   )	r   r   r   r   r   r   r   r   from_private_bytesr   r   r   r   r3   Q   s    z"Ed448PrivateKey.from_private_bytesr   c                 C  s   dS )zB
        The Ed448PublicKey derived from the private key.
        Nr   r   r   r   r   
public_key]   s    zEd448PrivateKey.public_keyr	   c                 C  s   dS )z!
        Signs the data.
        Nr   )r   r   r   r   r   signc   s    zEd448PrivateKey.signr   z_serialization.PrivateFormatz)_serialization.KeySerializationEncryption)r   r   encryption_algorithmr   c                 C  s   dS )z:
        The serialized bytes of the private key.
        Nr   )r   r   r   r6   r   r   r   private_bytesi   s    zEd448PrivateKey.private_bytesc                 C  s   dS )zr
        The raw bytes of the private key.
        Equivalent to private_bytes(Raw, Raw, NoEncryption()).
        Nr   r   r   r   r   private_bytes_rawt   s    z!Ed448PrivateKey.private_bytes_rawc                 C  s   dS r(   r   r   r   r   r   r)   {   s    zEd448PrivateKey.__copy__N)r*   r+   r,   r-   r2   r3   r.   r/   r4   r5   r7   r8   r)   r   r   r   r   r1   D   s   
r1   Zx448)Z
__future__r   r.   Zcryptography.exceptionsr   r   Z"cryptography.hazmat.bindings._rustr   r   Zcryptography.hazmat.primitivesr   Zcryptography.utilsr   ABCMetar   hasattrregisterr   r1   r   r   r   r   <module>   s   1
>
