o
    "“i:  ã                   @  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
ƒr:e ejj¡ G dd„ dejd	�Zeed
ƒrRe ejj¡ dS dS )é    )ÚannotationsN)ÚUnsupportedAlgorithmÚ_Reasons)Úopenssl)Ú_serialization)ÚBufferc                   @  sZ   e Zd Ze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 )ÚX448PublicKeyÚdataÚbytesÚreturnc                 C  ó,   ddl m} | ¡ stdtjƒ‚t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©Úclsr	   r   © r   ún/var/www/html/premium_crap/venv/lib/python3.10/site-packages/cryptography/hazmat/primitives/asymmetric/x448.pyr      ó   þzX448PublicKey.from_public_bytesÚencodingú_serialization.EncodingÚformatú_serialization.PublicFormatc                 C  ó   dS )z9
        The serialized bytes of the public key.
        Nr   )Úselfr   r   r   r   r   Úpublic_bytes   ó    zX448PublicKey.public_bytesc                 C  r   )z`
        The raw bytes of the public key.
        Equivalent to public_bytes(Raw, Raw).
        Nr   ©r   r   r   r   Úpublic_bytes_raw&   r!   zX448PublicKey.public_bytes_rawÚotherÚobjectÚboolc                 C  r   )z"
        Checks equality.
        Nr   )r   r$   r   r   r   Ú__eq__-   r!   zX448PublicKey.__eq__c                 C  r   ©z!
        Returns a copy.
        Nr   r"   r   r   r   Ú__copy__3   r!   zX448PublicKey.__copy__N)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)   r   r   r   r   r      s    	r   )Ú	metaclassr   c                   @  sx   e Zd Zeddd„ƒZe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 )"ÚX448PrivateKeyr   c                 C  s*   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   r   r   r   Úgenerate?   s   þ
zX448PrivateKey.generater	   r   c                 C  r   r   )	r   r   r   r   r   r   r   r   Úfrom_private_bytesr   r   r   r   r6   K   r   z!X448PrivateKey.from_private_bytesr   c                 C  r   )zI
        Returns the public key associated with this private key
        Nr   r"   r   r   r   Ú
public_keyW   r!   zX448PrivateKey.public_keyr   r   r   ú_serialization.PrivateFormatÚencryption_algorithmú)_serialization.KeySerializationEncryptionr
   c                 C  r   )z:
        The serialized bytes of the private key.
        Nr   )r   r   r   r9   r   r   r   Úprivate_bytes]   r!   zX448PrivateKey.private_bytesc                 C  r   )zr
        The raw bytes of the private key.
        Equivalent to private_bytes(Raw, Raw, NoEncryption()).
        Nr   r"   r   r   r   Úprivate_bytes_rawh   r!   z X448PrivateKey.private_bytes_rawÚpeer_public_keyc                 C  r   )zY
        Performs a key exchange operation using the provided peer's public key.
        Nr   )r   r=   r   r   r   Úexchangeo   r!   zX448PrivateKey.exchangec                 C  r   r(   r   r"   r   r   r   r)   u   r!   zX448PrivateKey.__copy__N)r   r3   )r	   r   r   r3   r+   )r   r   r   r8   r9   r:   r   r
   r*   )r=   r   r   r
   )r,   r-   r.   r/   r5   r6   r0   r1   r7   r;   r<   r>   r)   r   r   r   r   r3   >   s    
r3   )Ú
__future__r   r0   Úcryptography.exceptionsr   r   Ú"cryptography.hazmat.bindings._rustr   r   Úcryptography.hazmat.primitivesr   Úcryptography.utilsr   ÚABCMetar   ÚhasattrÚregisterr   r3   r   r   r   r   Ú<module>   s   
+
>ÿ