o
    Vh\                     @  s   d dl mZ d dlZd dlmZ d dlmZ ejj	Z	ejj
Z
ejjZejjZG dd dejdZeZeejj G dd	 d	ejdZeZeejj G d
d dejdZeZeejj dS )    )annotationsN)openssl)_serializationc                   @  s<   e Zd ZejdddZejdd
dZejdddZdS )DHParametersreturnDHPrivateKeyc                 C     dS )z7
        Generates and returns a DHPrivateKey.
        N selfr	   r	   /var/www/html/construction_image-detection-poc/venv/lib/python3.10/site-packages/cryptography/hazmat/primitives/asymmetric/dh.pygenerate_private_key       z!DHParameters.generate_private_keyencoding_serialization.Encodingformat_serialization.ParameterFormatbytesc                 C  r   )z=
        Returns the parameters serialized as bytes.
        Nr	   r   r   r   r	   r	   r   parameter_bytes   r   zDHParameters.parameter_bytesDHParameterNumbersc                 C  r   )z/
        Returns a DHParameterNumbers.
        Nr	   r
   r	   r	   r   parameter_numbers%   r   zDHParameters.parameter_numbersN)r   r   )r   r   r   r   r   r   )r   r   )__name__
__module____qualname__abcabstractmethodr   r   r   r	   r	   r	   r   r      s    	r   )	metaclassc                   @  s`   e Zd ZeejdddZejdddZejdd	d
ZejdddZ	ejdddZ
dS )DHPublicKeyr   intc                 C  r   z6
        The bit length of the prime modulus.
        Nr	   r
   r	   r	   r   key_size1   r   zDHPublicKey.key_sizer   c                 C  r   )zJ
        The DHParameters object associated with this public key.
        Nr	   r
   r	   r	   r   
parameters8   r   zDHPublicKey.parametersDHPublicNumbersc                 C  r   )z,
        Returns a DHPublicNumbers.
        Nr	   r
   r	   r	   r   public_numbers>   r   zDHPublicKey.public_numbersr   r   r   _serialization.PublicFormatr   c                 C  r   z6
        Returns the key serialized as bytes.
        Nr	   r   r	   r	   r   public_bytesD   r   zDHPublicKey.public_bytesotherobjectboolc                 C  r   )z"
        Checks equality.
        Nr	   )r   r(   r	   r	   r   __eq__N   r   zDHPublicKey.__eq__Nr   r   r   r   )r   r#   )r   r   r   r%   r   r   )r(   r)   r   r*   )r   r   r   propertyr   r   r!   r"   r$   r'   r+   r	   r	   r	   r   r   0   s    	r   c                   @  sp   e Zd ZeejdddZejdddZejdd	d
ZejdddZ	ejdddZ
ejd ddZdS )!r   r   r   c                 C  r   r    r	   r
   r	   r	   r   r!   Z   r   zDHPrivateKey.key_sizer   c                 C  r   )zC
        The DHPublicKey associated with this private key.
        Nr	   r
   r	   r	   r   
public_keya   r   zDHPrivateKey.public_keyr   c                 C  r   )zK
        The DHParameters object associated with this private key.
        Nr	   r
   r	   r	   r   r"   g   r   zDHPrivateKey.parameterspeer_public_keyr   c                 C  r   )zn
        Given peer's DHPublicKey, carry out the key exchange and
        return shared key as bytes.
        Nr	   )r   r0   r	   r	   r   exchangem   r   zDHPrivateKey.exchangeDHPrivateNumbersc                 C  r   )z-
        Returns a DHPrivateNumbers.
        Nr	   r
   r	   r	   r   private_numberst   r   zDHPrivateKey.private_numbersr   r   r   _serialization.PrivateFormatencryption_algorithm)_serialization.KeySerializationEncryptionc                 C  r   r&   r	   )r   r   r   r5   r	   r	   r   private_bytesz   r   zDHPrivateKey.private_bytesNr,   )r   r   r-   )r0   r   r   r   )r   r2   )r   r   r   r4   r5   r6   r   r   )r   r   r   r.   r   r   r!   r/   r"   r1   r3   r7   r	   r	   r	   r   r   Y   s    r   )
__future__r   r   "cryptography.hazmat.bindings._rustr   rust_opensslcryptography.hazmat.primitivesr   dhgenerate_parametersr2   r#   r   ABCMetar   DHParametersWithSerializationregisterr   DHPublicKeyWithSerializationr   DHPrivateKeyWithSerializationr	   r	   r	   r   <module>   s"   %-