
    +h                    R   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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)_serializationc                      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)Ed25519PublicKeyc                    ddl m} |j                         st        dt        j
                        |j                  |      S Nr   )backendz4ed25519 is not supported by this version of OpenSSL.),cryptography.hazmat.backends.openssl.backendr   ed25519_supportedr   r    UNSUPPORTED_PUBLIC_KEY_ALGORITHMed25519_load_public_bytesclsdatar   s      d/var/www/html/venv/lib/python3.12/site-packages/cryptography/hazmat/primitives/asymmetric/ed25519.pyfrom_public_bytesz"Ed25519PublicKey.from_public_bytes   s=    H((*&F99 
 0066    c                     y)z9
        The serialized bytes of the public key.
        N )selfencodingformats      r   public_byteszEd25519PublicKey.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!Ed25519PublicKey.public_bytes_raw%   r   r   c                     y)z'
        Verify the signature.
        Nr   )r   	signaturer   s      r   verifyzEd25519PublicKey.verify,   r   r   c                     y)z"
        Checks equality.
        Nr   )r   others     r   __eq__zEd25519PublicKey.__eq__2   r   r   N)r   bytesreturnr	   )r   _serialization.Encodingr   z_serialization.PublicFormatr(   r'   r(   r'   )r"   r'   r   r'   r(   None)r%   objectr(   bool)__name__
__module____qualname__classmethodr   abcabstractmethodr   r    r#   r&   r   r   r   r	   r	      s    	7 	7 	) , 
	  	  	 
 	 r   r	   )	metaclassed25519c                      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y)Ed25519PrivateKeyc                    ddl m} |j                         st        dt        j
                        |j                         S r   )r   r   r   r   r   r   ed25519_generate_key)r   r   s     r   generatezEd25519PrivateKey.generate>   s;    H((*&F99 
 ++--r   c                    ddl m} |j                         st        dt        j
                        |j                  |      S r   )r   r   r   r   r   r   ed25519_load_private_bytesr   s      r   from_private_bytesz$Ed25519PrivateKey.from_private_bytesJ   s=    H((*&F99 
 11$77r   c                     y)zD
        The Ed25519PublicKey derived from the private key.
        Nr   r   s    r   
public_keyzEd25519PrivateKey.public_keyV   r   r   c                     y)z:
        The serialized bytes of the private key.
        Nr   )r   r   r   encryption_algorithms       r   private_byteszEd25519PrivateKey.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#Ed25519PrivateKey.private_bytes_rawg   r   r   c                     y)z!
        Signs the data.
        Nr   )r   r   s     r   signzEd25519PrivateKey.signn   r   r   N)r(   r7   )r   r'   r(   r7   )r(   r	   )r   r)   r   z_serialization.PrivateFormatrA   z)_serialization.KeySerializationEncryptionr(   r'   r*   )r   r'   r(   r'   )r.   r/   r0   r1   r:   r=   r2   r3   r?   rB   rD   rF   r   r   r   r7   r7   =   s    	. 	. 	8 	8 	 
 	) - H	
 
  	  	 r   r7   x25519)
__future__r   r2   cryptography.exceptionsr   r   "cryptography.hazmat.bindings._rustr   rust_opensslcryptography.hazmat.primitivesr   ABCMetar	   hasattrregisterr5   r7   r   r   r   <module>rP      s   
 # 
 B F 9( (V <#l22CCD5#++ 5p <"|33EEF #r   