o
    ÖèFh_  ã                   @  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
 G dd„ dejd�Ze ejj¡ G d	d
„ d
ejd�Ze ejj¡ dS )é    )ÚannotationsN)ÚUnsupportedAlgorithmÚ_Reasons)Úopenssl)Ú_serializationc                   @  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 )ÚEd25519PublicKeyÚdataÚbytesÚreturnc                 C  ó,   ddl m} | ¡ stdtjƒ‚tj |¡S ©Nr   )Úbackendz4ed25519 is not supported by this version of OpenSSL.)	Ú,cryptography.hazmat.backends.openssl.backendr   Úed25519_supportedr   r   Ú UNSUPPORTED_PUBLIC_KEY_ALGORITHMÚrust_opensslÚed25519Úfrom_public_bytes©Úclsr   r   © r   új/var/www/html/loop/nvenv/lib/python3.10/site-packages/cryptography/hazmat/primitives/asymmetric/ed25519.pyr      ó   þz"Ed25519PublicKey.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Ed25519PublicKey.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!Ed25519PublicKey.public_bytes_rawÚ	signatureÚNonec                 C  r   )z'
        Verify the signature.
        Nr   )r   r#   r   r   r   r   Úverify,   r    zEd25519PublicKey.verifyÚotherÚobjectÚboolc                 C  r   )z"
        Checks equality.
        Nr   )r   r&   r   r   r   Ú__eq__2   r    zEd25519PublicKey.__eq__N)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)   r   r   r   r   r      s    	r   )Ú	metaclassc                   @  sh   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dS )ÚEd25519PrivateKeyr
   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Ed25519PrivateKey.generater   r	   c                 C  r   r   )	r   r   r   r   r   r   r   r   Úfrom_private_bytesr   r   r   r   r5   I   r   z$Ed25519PrivateKey.from_private_bytesr   c                 C  r   )zD
        The Ed25519PublicKey derived from the private key.
        Nr   r!   r   r   r   Ú
public_keyU   r    zEd25519PrivateKey.public_keyr   r   r   ú_serialization.PrivateFormatÚencryption_algorithmú)_serialization.KeySerializationEncryptionc                 C  r   )z:
        The serialized bytes of the private key.
        Nr   )r   r   r   r8   r   r   r   Úprivate_bytes[   r    zEd25519PrivateKey.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_rawf   r    z#Ed25519PrivateKey.private_bytes_rawc                 C  r   )z!
        Signs the data.
        Nr   )r   r   r   r   r   Úsignm   r    zEd25519PrivateKey.signN)r
   r2   )r   r	   r
   r2   )r
   r   )r   r   r   r7   r8   r9   r
   r	   r*   )r   r	   r
   r	   )r+   r,   r-   r.   r4   r5   r/   r0   r6   r:   r;   r<   r   r   r   r   r2   <   s    
r2   )Ú
__future__r   r/   Úcryptography.exceptionsr   r   Ú"cryptography.hazmat.bindings._rustr   r   Úcryptography.hazmat.primitivesr   ÚABCMetar   Úregisterr   r2   r   r   r   r   Ú<module>   s   +8