o
    àý°jò  ã                   @  sR   d dl mZ d dlZd dlmZ G dd„ dejd�ZG dd„ deƒZddd„ZdS )é    )ÚannotationsN)Úutilsc                   @  sH   e Zd Zeejddd„ƒƒZeejddd„ƒƒZeejdd	d
„ƒƒZdS )ÚCipherAlgorithmÚreturnÚstrc                 C  ó   dS )zE
        A string naming this mode (e.g. "AES", "Camellia").
        N© ©Úselfr   r   ú¢/root/aizidognhua/tmp/workspace/projects/ec89d86c-575f-41c9-af57-ac45cbdbf775/venv/lib/python3.10/site-packages/cryptography/hazmat/primitives/_cipheralgorithm.pyÚname   ó    zCipherAlgorithm.nameúfrozenset[int]c                 C  r   )z<
        Valid key sizes for this algorithm in bits
        Nr   r	   r   r   r   Ú	key_sizes   r   zCipherAlgorithm.key_sizesÚintc                 C  r   )zW
        The size of the key being used as an integer in bits (e.g. 128, 256).
        Nr   r	   r   r   r   Úkey_size   r   zCipherAlgorithm.key_sizeN)r   r   )r   r   ©r   r   )	Ú__name__Ú
__module__Ú__qualname__ÚpropertyÚabcÚabstractmethodr   r   r   r   r   r   r   r      s    r   )Ú	metaclassc                   @  s*   e Zd ZU ded< eejddd„ƒƒZdS )	ÚBlockCipherAlgorithmúutils.BufferÚkeyr   r   c                 C  r   )zK
        The size of a block as an integer in bits (e.g. 64, 128).
        Nr   r	   r   r   r   Ú
block_size)   r   zBlockCipherAlgorithm.block_sizeNr   )r   r   r   Ú__annotations__r   r   r   r   r   r   r   r   r   &   s
   
 r   Ú	algorithmr   r   r   c                 C  sB   t  d|¡ t|ƒd | jvrtdt|ƒd › d| j› d�ƒ‚|S )Nr   é   zInvalid key size (z) for Ú.)r   Ú_check_byteslikeÚlenr   Ú
ValueErrorr   )r   r   r   r   r   Ú_verify_key_size1   s   ÿr%   )r   r   r   r   r   r   )	Ú
__future__r   r   Úcryptographyr   ÚABCMetar   r   r%   r   r   r   r   Ú<module>   s   