
    2i                       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 d dlmZmZ  G d de      Z G d de      Z G d de      Z ej(                  e
edej,                  d        ej(                  eedej,                  d        ej(                  eedej,                  d        G d de      Z G d de      Zy)    )annotations)utils)ARC4)CAST5)IDEA)SEED)Blowfish)Camellia)	TripleDES)_verify_key_size)BlockCipherAlgorithmCipherAlgorithmc                  B    e Zd Zd ZdZ eg d      ZddZedd       Z	y)AES   )r         i   c                &    t        | |      | _        y Nr   keyselfr   s     g/var/www/html/qr/venv/lib/python3.12/site-packages/cryptography/hazmat/primitives/ciphers/algorithms.py__init__zAES.__init__*       #D#.    c                2    t        | j                        dz  S N   lenr   r   s    r   key_sizezAES.key_size-       488}q  r   Nr   utils.Bufferreturnint
__name__
__module____qualname__name
block_size	frozenset	key_sizesr   propertyr$    r   r   r   r   $   s0    DJ./I/ ! !r   r   c                  2    e Zd ZdZdZ edg      ZdZddZy)AES128r   r   c                &    t        | |      | _        y r   r   r   s     r   r   zAES128.__init__8   r   r   Nr&   	r,   r-   r.   r/   r0   r1   r2   r$   r   r4   r   r   r6   r6   2   "    DJ3% IH/r   r6   c                  2    e Zd ZdZdZ edg      ZdZddZy)AES256r   r   r   c                &    t        | |      | _        y r   r   r   s     r   r   zAES256.__init__B   r   r   Nr&   r8   r4   r   r   r;   r;   <   r9   r   r;   zCamellia has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.Camellia and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 49.0.0.r
   )r/   zARC4 has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.ARC4 and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0.r   zTripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0.r   c                  N    e Zd Zd Z edg      ZddZedd       Zedd       Z	y)	ChaCha20r   c                    t        | |      | _        t        j                  d|       t	        |      dk7  rt        d      || _        y )Nnonce   z!nonce must be 128-bits (16 bytes))r   r   r   _check_bytesliker"   
ValueError_nonce)r   r   r@   s      r   r   zChaCha20.__init__n   s?    #D#.w.u:@AAr   c                    | j                   S r   )rD   r#   s    r   r@   zChaCha20.noncew   s    {{r   c                2    t        | j                        dz  S r   r!   r#   s    r   r$   zChaCha20.key_size{   r%   r   N)r   r'   r@   r'   )r)   r'   r(   )
r,   r-   r.   r/   r1   r2   r   r3   r@   r$   r4   r   r   r>   r>   j   s@    D3% I   ! !r   r>   c                  @    e Zd Zd ZdZ edg      ZddZedd       Z	y)SM4r   c                &    t        | |      | _        y r   r   r   s     r   r   zSM4.__init__   r   r   c                2    t        | j                        dz  S r   r!   r#   s    r   r$   zSM4.key_size   r%   r   N)r   bytesr(   r+   r4   r   r   rH   rH      s1    DJ3% I/ ! !r   rH   N)
__future__r   cryptographyr   /cryptography.hazmat.decrepit.ciphers.algorithmsr   r   r   r   r	   r
   r   /cryptography.hazmat.primitives._cipheralgorithmr   &cryptography.hazmat.primitives.ciphersr   r   r   r6   r;   
deprecatedr,   DeprecatedIn43r>   rH   r4   r   r   <module>rS      s   
 #  M!
 !/! //! /   C 
		   C 
		   C 
		! !,
!
 
!r   