
    ӝgh:                    ^   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j!                  ej"                  j                          G d dej                  	      Z eed
      r&ej!                  ej"                  j$                         yy)    )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
y)X448PublicKeyc                    ddl m} |j                         st        dt        j
                        t        j                  j                  |      S Nr   )backendz1X448 is not supported by this version of OpenSSL.)	,cryptography.hazmat.backends.openssl.backendr   x448_supportedr   r   UNSUPPORTED_EXCHANGE_ALGORITHMrust_opensslx448from_public_bytesclsdatar   s      r/var/www/enzed_healthcare/enzed_env/lib/python3.12/site-packages/cryptography/hazmat/primitives/asymmetric/x448.pyr   zX448PublicKey.from_public_bytes   sC    H%%'&C77 
   22488    c                     y)z9
        The serialized bytes of the public key.
        N )selfencodingformats      r   public_byteszX448PublicKey.public_bytes       r   c                     y)z`
        The raw bytes of the public key.
        Equivalent to public_bytes(Raw, Raw).
        Nr   r   s    r   public_bytes_rawzX448PublicKey.public_bytes_raw&   r   r   c                     y)z"
        Checks equality.
        Nr   )r   others     r   __eq__zX448PublicKey.__eq__-   r   r   c                     yz!
        Returns a copy.
        Nr   r!   s    r   __copy__zX448PublicKey.__copy__3   r   r   N)r   bytesreturnr
   )r   _serialization.Encodingr   z_serialization.PublicFormatr*   r)   r*   r)   )r$   objectr*   boolr*   r
   )__name__
__module____qualname__classmethodr   abcabstractmethodr   r"   r%   r(   r   r   r   r
   r
      s    	9 	9 	) , 
	  	  	 
 	 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y)X448PrivateKeyc                    ddl m} |j                         st        dt        j
                        t        j                  j                         S r   )	r   r   r   r   r   r   r   r   generate_key)r   r   s     r   generatezX448PrivateKey.generate?   sA    H%%'&C77 
   --//r   c                    ddl m} |j                         st        dt        j
                        t        j                  j                  |      S r   )	r   r   r   r   r   r   r   r   from_private_bytesr   s      r   r=   z!X448PrivateKey.from_private_bytesK   sC    H%%'&C77 
   33D99r   c                     y)zI
        Returns the public key associated with this private key
        Nr   r!   s    r   
public_keyzX448PrivateKey.public_keyW   r   r   c                     y)z:
        The serialized bytes of the private key.
        Nr   )r   r   r   encryption_algorithms       r   private_byteszX448PrivateKey.private_bytes]   r   r   c                     y)zr
        The raw bytes of the private key.
        Equivalent to private_bytes(Raw, Raw, NoEncryption()).
        Nr   r!   s    r   private_bytes_rawz X448PrivateKey.private_bytes_rawh   r   r   c                     y)zY
        Performs a key exchange operation using the provided peer's public key.
        Nr   )r   peer_public_keys     r   exchangezX448PrivateKey.exchangeo   r   r   c                     yr'   r   r!   s    r   r(   zX448PrivateKey.__copy__u   r   r   N)r*   r8   )r   r   r*   r8   r/   )r   r+   r   z_serialization.PrivateFormatrA   z)_serialization.KeySerializationEncryptionr*   r)   r,   )rF   r
   r*   r)   )r0   r1   r2   r3   r;   r=   r4   r5   r?   rB   rD   rG   r(   r   r   r   r8   r8   >   s    	0 	0 	: 	: 	 
 	) - H	
 
  	  	 
 	 r   r8   )
__future__r   r4   cryptography.exceptionsr   r   "cryptography.hazmat.bindings._rustr   r   cryptography.hazmat.primitivesr   cryptography.utilsr   ABCMetar
   hasattrregisterr   r8   r   r   r   <module>rQ      s   
 # 
 B F 9 %(ckk (V < <,,::;;s{{ ;| < L--<<= !r   