o
    Df                     @  sd  d dl mZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlm	Z	 d dlm
Z
 d d	lmZ d d
lmZmZ G dd deZG dd deZG dd deZG dd deZejeedejdd eje
edejdd eje	edejdd ejeedejdd ejeedejdd ejeedejdd G d d! d!eZG d"d# d#eZd$S )%    )annotations)utils)ARC4)CAST5)IDEA)SEED)Blowfish)	TripleDES)_verify_key_size)BlockCipherAlgorithmCipherAlgorithmc                   @  s8   e Zd Zd ZdZeg dZdddZedd	d
Z	dS )AES   )r         i   keybytesc                 C     t | || _d S Nr
   r   selfr    r   j/home/ubuntu/webapp/venv/lib/python3.10/site-packages/cryptography/hazmat/primitives/ciphers/algorithms.py__init__'      zAES.__init__returnintc                 C     t | jd S N   lenr   r   r   r   r   key_size*      zAES.key_sizeNr   r   r   r   
__name__
__module____qualname__name
block_size	frozenset	key_sizesr   propertyr$   r   r   r   r   r   !   s    
r   c                   @  s,   e Zd ZdZdZedgZdZdddZdS )	AES128r   r   r   r   c                 C  r   r   r   r   r   r   r   r   5   r   zAES128.__init__Nr&   	r)   r*   r+   r,   r-   r.   r/   r$   r   r   r   r   r   r1   /       
r1   c                   @  s,   e Zd ZdZdZedgZdZd	ddZdS )
AES256r   r   r   r   r   c                 C  r   r   r   r   r   r   r   r   ?   r   zAES256.__init__Nr&   r2   r   r   r   r   r4   9   r3   r4   c                   @  s8   e Zd ZdZdZeg dZdddZedd
dZ	dS )Camelliacamelliar   )r   r   r   r   r   c                 C  r   r   r   r   r   r   r   r   H   r   zCamellia.__init__r   r   c                 C  r   r   r!   r#   r   r   r   r$   K   r%   zCamellia.key_sizeNr&   r'   r(   r   r   r   r   r5   C   s    
r5   z{ARC4 has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.ARC4 and will be removed from this module in 48.0.0.r   )r,   zTripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from this module in 48.0.0.r	   zBlowfish has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.Blowfish and will be removed from this module in 45.0.0.r   z}CAST5 has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.CAST5 and will be removed from this module in 45.0.0.r   z{IDEA has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.IDEA and will be removed from this module in 45.0.0.r   z{SEED has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.SEED and will be removed from this module in 45.0.0.r   c                   @  s@   e Zd Zd ZedgZdddZeddd	ZedddZ	dS )ChaCha20r   r   r   noncec                 C  s6   t | || _td| t|dkrtd|| _d S )Nr8      z!nonce must be 128-bits (16 bytes))r
   r   r   _check_bytesliker"   
ValueError_nonce)r   r   r8   r   r   r   r      s
   
zChaCha20.__init__r   c                 C  s   | j S r   )r<   r#   r   r   r   r8      s   zChaCha20.noncer   c                 C  r   r   r!   r#   r   r   r   r$      r%   zChaCha20.key_sizeN)r   r   r8   r   )r   r   r'   )
r)   r*   r+   r,   r.   r/   r   r0   r8   r$   r   r   r   r   r7      s    

	r7   c                   @  s6   e Zd Zd ZdZedgZdddZeddd	Z	d
S )SM4r   r   r   c                 C  r   r   r   r   r   r   r   r      r   zSM4.__init__r   r   c                 C  r   r   r!   r#   r   r   r   r$      r%   zSM4.key_sizeNr&   r'   r(   r   r   r   r   r=      s    

r=   N)
__future__r   cryptographyr   /cryptography.hazmat.decrepit.ciphers.algorithmsr   r   r   r   r   r	   /cryptography.hazmat.primitives._cipheralgorithmr
   &cryptography.hazmat.primitives.ciphersr   r   r   r1   r4   r5   
deprecatedr)   DeprecatedIn43DeprecatedIn37r7   r=   r   r   r   r   <module>   st   


