
    Ri                    N   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ej        	          Z eed
          re                    ej        j                    G d dej        	          Z eed          r!e                    ej        j                   dS dS )    )annotationsN)UnsupportedAlgorithm_Reasons)openssl)_serialization)Bufferc                      e Zd Zedd            Zej        dd	            Zej        dd
            Zej        dd            Z	ej        dd            Z
ej        dd            ZdS )Ed448PublicKeydatabytesreturnc                    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   s      g/srv/django_bis/venv311/lib/python3.11/site-packages/cryptography/hazmat/primitives/asymmetric/ed448.pyr   z Ed448PublicKey.from_public_bytes   s\    HHHHHH&&(( 	&D9  
 !33D999    encoding_serialization.Encodingformat_serialization.PublicFormatc                    dS )z9
        The serialized bytes of the public key.
        N )selfr   r   s      r   public_byteszEd448PublicKey.public_bytes         r   c                    dS )z`
        The raw bytes of the public key.
        Equivalent to public_bytes(Raw, Raw).
        Nr    r!   s    r   public_bytes_rawzEd448PublicKey.public_bytes_raw&   r#   r   	signaturer   Nonec                    dS )z'
        Verify the signature.
        Nr    )r!   r'   r   s      r   verifyzEd448PublicKey.verify-   r#   r   otherobjectboolc                    dS )z"
        Checks equality.
        Nr    )r!   r+   s     r   __eq__zEd448PublicKey.__eq__3   r#   r   c                    dS z!
        Returns a copy.
        Nr    r%   s    r   __copy__zEd448PublicKey.__copy__9   r#   r   N)r   r   r   r
   )r   r   r   r   r   r   r   r   )r'   r   r   r   r   r(   )r+   r,   r   r-   r   r
   )__name__
__module____qualname__classmethodr   abcabstractmethodr"   r&   r*   r/   r2   r    r   r   r
   r
      s        	: 	: 	: [	: 	    	    	   
 	   
 	     r   r
   )	metaclassr   c                      e Zd Zedd            Zedd            Zej        dd            Zej        dd	            Z	ej        dd            Z
ej        dd            Zej        dd            ZdS )Ed448PrivateKeyr   c                    ddl m} |                                st          dt          j                  t          j                                        S r   )	r   r   r   r   r   r   r   r   generate_key)r   r   s     r   generatezEd448PrivateKey.generateE   sZ    HHHHHH&&(( 	&D9  
 !..000r   r   r   c                    ddl m} |                                st          dt          j                  t          j                            |          S r   )	r   r   r   r   r   r   r   r   from_private_bytesr   s      r   rB   z"Ed448PrivateKey.from_private_bytesQ   s\    HHHHHH&&(( 	&D9  
 !44T:::r   r
   c                    dS )zB
        The Ed448PublicKey derived from the private key.
        Nr    r%   s    r   
public_keyzEd448PrivateKey.public_key]   r#   r   r   c                    dS )z!
        Signs the data.
        Nr    )r!   r   s     r   signzEd448PrivateKey.signc   r#   r   r   r   r   _serialization.PrivateFormatencryption_algorithm)_serialization.KeySerializationEncryptionc                    dS )z:
        The serialized bytes of the private key.
        Nr    )r!   r   r   rH   s       r   private_byteszEd448PrivateKey.private_bytesi   r#   r   c                    dS )zr
        The raw bytes of the private key.
        Equivalent to private_bytes(Raw, Raw, NoEncryption()).
        Nr    r%   s    r   private_bytes_rawz!Ed448PrivateKey.private_bytes_rawt   r#   r   c                    dS r1   r    r%   s    r   r2   zEd448PrivateKey.__copy__{   r#   r   N)r   r=   )r   r   r   r=   r4   )r   r   r   r   )r   r   r   rG   rH   rI   r   r   r3   )r5   r6   r7   r8   r@   rB   r9   r:   rD   rF   rK   rM   r2   r    r   r   r=   r=   D   s       	1 	1 	1 [	1 	; 	; 	; [	; 	   
 	   
 	    	    	     r   r=   x448)
__future__r   r9   cryptography.exceptionsr   r   "cryptography.hazmat.bindings._rustr   r   cryptography.hazmat.primitivesr   cryptography.utilsr   ABCMetar
   hasattrregisterr   r=   r    r   r   <module>rX      sG  
 # " " " " " 



 B B B B B B B B F F F F F F 9 9 9 9 9 9 % % % % % %. . . . .s{ . . . .b 7<!! ?L.=>>>; ; ; ; ; ; ; ; ;| 7<   A\/?@@@@@A Ar   