a
    còf€  ã                   @  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d	ƒrhe ejj¡ G d
d„ dejd�Zeedƒr”e ejj¡ dS )é    )ÚannotationsN)ÚUnsupportedAlgorithmÚ_Reasons)Úopenssl)Ú_serializationc                   @  sz   e Zd Zedd dœdd„ƒZejddddœdd	„ƒZejdd
œdd„ƒZejddddœdd„ƒZ	ejdddœdd„ƒZ
dS )ÚEd448PublicKeyÚbytes©ÚdataÚreturnc                 C  s,   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   úl/home/httpd/docs/test/DocsMgr/lib/python3.9/site-packages/cryptography/hazmat/primitives/asymmetric/ed448.pyr      s    þz Ed448PublicKey.from_public_bytesú_serialization.Encodingz_serialization.PublicFormat)ÚencodingÚformatr   c                 C  s   dS )z9
        The serialized bytes of the public key.
        Nr   )Úselfr   r   r   r   r   Úpublic_bytes   s    zEd448PublicKey.public_bytes©r   c                 C  s   dS )z`
        The raw bytes of the public key.
        Equivalent to public_bytes(Raw, Raw).
        Nr   ©r   r   r   r   Úpublic_bytes_raw%   s    zEd448PublicKey.public_bytes_rawÚNone)Ú	signaturer
   r   c                 C  s   dS )z'
        Verify the signature.
        Nr   )r   r!   r
   r   r   r   Úverify,   s    zEd448PublicKey.verifyÚobjectÚbool)Úotherr   c                 C  s   dS )z"
        Checks equality.
        Nr   )r   r%   r   r   r   Ú__eq__2   s    zEd448PublicKey.__eq__N)Ú__name__Ú
__module__Ú__qualname__Úclassmethodr   ÚabcÚabstractmethodr   r   r"   r&   r   r   r   r   r      s   	r   )Ú	metaclassr   c                   @  sŠ   e Zd Zed dœdd„ƒZedd dœdd„ƒZejddœd	d
„ƒZejdddœdd„ƒZ	ejdddddœdd„ƒZ
ejd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   Zgenerate_key)r   r   r   r   r   Úgenerate>   s    þzEd448PrivateKey.generater   r	   c                 C  s,   ddl m} | ¡ s tdtjƒ‚tj |¡S r   )	r   r   r   r   r   r   r   r   Úfrom_private_bytesr   r   r   r   r0   J   s    þz"Ed448PrivateKey.from_private_bytesr   c                 C  s   dS )zB
        The Ed448PublicKey derived from the private key.
        Nr   r   r   r   r   Ú
public_keyV   s    zEd448PrivateKey.public_keyc                 C  s   dS )z!
        Signs the data.
        Nr   )r   r
   r   r   r   Úsign\   s    zEd448PrivateKey.signr   z_serialization.PrivateFormatz)_serialization.KeySerializationEncryption)r   r   Úencryption_algorithmr   c                 C  s   dS )z:
        The serialized bytes of the private key.
        Nr   )r   r   r   r3   r   r   r   Úprivate_bytesb   s    zEd448PrivateKey.private_bytesc                 C  s   dS )zr
        The raw bytes of the private key.
        Equivalent to private_bytes(Raw, Raw, NoEncryption()).
        Nr   r   r   r   r   Úprivate_bytes_rawm   s    z!Ed448PrivateKey.private_bytes_rawN)r'   r(   r)   r*   r/   r0   r+   r,   r1   r2   r4   r5   r   r   r   r   r.   =   s   
r.   Zx448)Ú
__future__r   r+   Zcryptography.exceptionsr   r   Z"cryptography.hazmat.bindings._rustr   r   Zcryptography.hazmat.primitivesr   ÚABCMetar   ÚhasattrÚregisterr   r.   r   r   r   r   Ú<module>   s   +
8
