o
    Z2h                     @  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                   @  sj   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
ejd ddZdS )!Ed448PublicKeydatabytesreturnc                 C  ,   ddl m} | stdtjtj|S Nr   )backendz2ed448 is not supported by this version of OpenSSL.)	,cryptography.hazmat.backends.openssl.backendr   ed448_supportedr   r    UNSUPPORTED_PUBLIC_KEY_ALGORITHMrust_openssled448from_public_bytesclsr	   r    r   /home/skpark/git/infrasmart_work/infrasmart/venv/lib/python3.10/site-packages/cryptography/hazmat/primitives/asymmetric/ed448.pyr         z Ed448PublicKey.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Ed448PublicKey.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Ed448PublicKey.public_bytes_raw	signaturer   Nonec                 C  r   )z'
        Verify the signature.
        Nr   )r   r$   r	   r   r   r   verify-   r!   zEd448PublicKey.verifyotherobjectboolc                 C  r   )z"
        Checks equality.
        Nr   )r   r'   r   r   r   __eq__3   r!   zEd448PublicKey.__eq__c                 C  r   z!
        Returns a copy.
        Nr   r"   r   r   r   __copy__9   r!   zEd448PublicKey.__copy__N)r	   r
   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   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 )!Ed448PrivateKeyr   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   generateE   s   
zEd448PrivateKey.generater	   r   c                 C  r   r   )	r   r   r   r   r   r   r   r   from_private_bytesr   r   r   r   r9   Q   r   z"Ed448PrivateKey.from_private_bytesr   c                 C  r   )zB
        The Ed448PublicKey derived from the private key.
        Nr   r"   r   r   r   
public_key]   r!   zEd448PrivateKey.public_keyr
   c                 C  r   )z!
        Signs the data.
        Nr   )r   r	   r   r   r   signc   r!   zEd448PrivateKey.signr   r   r   _serialization.PrivateFormatencryption_algorithm)_serialization.KeySerializationEncryptionc                 C  r   )z:
        The serialized bytes of the private key.
        Nr   )r   r   r   r=   r   r   r   private_bytesi   r!   zEd448PrivateKey.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_rawt   r!   z!Ed448PrivateKey.private_bytes_rawc                 C  r   r+   r   r"   r   r   r   r,   {   r!   zEd448PrivateKey.__copy__N)r   r6   )r	   r   r   r6   r.   )r	   r   r   r
   )r   r   r   r<   r=   r>   r   r
   r-   )r/   r0   r1   r2   r8   r9   r3   r4   r:   r;   r?   r@   r,   r   r   r   r   r6   D   s    
r6   x448)
__future__r   r3   cryptography.exceptionsr   r   "cryptography.hazmat.bindings._rustr   r   cryptography.hazmat.primitivesr   cryptography.utilsr   ABCMetar   hasattrregisterr   r6   r   r   r   r   <module>   s   
1
>