U
    Zf                     @  sZ   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	d
ddZdS )    )annotationsN)utilsc                   @  sT   e Zd ZeejddddZeejddddZeejddd	d
ZdS )CipherAlgorithmstrreturnc                 C  s   dS )zE
        A string naming this mode (e.g. "AES", "Camellia").
        N selfr   r   S/tmp/pip-unpacked-wheel-xi8922e3/cryptography/hazmat/primitives/_cipheralgorithm.pyname   s    zCipherAlgorithm.namezfrozenset[int]c                 C  s   dS )z<
        Valid key sizes for this algorithm in bits
        Nr   r	   r   r   r   	key_sizes   s    zCipherAlgorithm.key_sizesintc                 C  s   dS )zW
        The size of the key being used as an integer in bits (e.g. 128, 256).
        Nr   r	   r   r   r   key_size   s    zCipherAlgorithm.key_sizeN)	__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dZdS )BlockCipherAlgorithmbyteskeyr   r   c                 C  s   dS )zK
        The size of a block as an integer in bits (e.g. 64, 128).
        Nr   r	   r   r   r   
block_size)   s    zBlockCipherAlgorithm.block_sizeN)r   r   r   __annotations__r   r   r   r   r   r   r   r   r   &   s   
r   r   )	algorithmr   r   c                 C  sB   t d| t|d | jkr>tdt|d  d| j d|S )Nr      zInvalid key size (z) for .)r   Z_check_byteslikelenr   
ValueErrorr   )r   r   r   r   r   _verify_key_size1   s    r!   )	
__future__r   r   Zcryptographyr   ABCMetar   r   r!   r   r   r   r   <module>   s
   