
    Wwg                       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 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        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)	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     h/var/www/horilla/myenv/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   bytes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__5   r   r   Nr%   	r+   r,   r-   r.   r/   r0   r1   r#   r   r3   r   r   r5   r5   /   "    DJ3% IH/r   r5   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__?   r   r   Nr%   r7   r3   r   r   r:   r:   9   r8   r   r:   c                  B    e Zd ZdZdZ eg d      ZddZedd       Z	y)	Camelliacamelliar   )r   r   r   c                &    t        | |      | _        y r   r   r   s     r   r   zCamellia.__init__H   r   r   c                2    t        | j                        dz  S r   r    r"   s    r   r#   zCamellia.key_sizeK   r$   r   Nr%   r'   r*   r3   r   r   r=   r=   C   s/    DJ/*I/ ! !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   )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
   zBlowfish has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.Blowfish and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 45.0.0.r	   zCAST5 has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.CAST5 and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 45.0.0.r   zIDEA has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.IDEA and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 45.0.0.r   zSEED has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.SEED and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 45.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   rD   s      r   r   zChaCha20.__init__   s?    #D#.w.u:@AAr   c                    | j                   S r   )rH   r"   s    r   rD   zChaCha20.nonce   s    {{r   c                2    t        | j                        dz  S r   r    r"   s    r   r#   zChaCha20.key_size   r$   r   N)r   r&   rD   r&   )r(   r&   r'   )
r+   r,   r-   r.   r0   r1   r   r2   rD   r#   r3   r   r   rB   rB      s@    D3% I   ! !r   rB   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   Nr%   r'   r*   r3   r   r   rL   rL      s1    DJ3% I/ ! !r   rL   N)
__future__r   cryptographyr   /cryptography.hazmat.decrepit.ciphers.algorithmsr   r   r   r   r	   r
   /cryptography.hazmat.primitives._cipheralgorithmr   &cryptography.hazmat.primitives.ciphersr   r   r   r5   r:   r=   
deprecatedr+   DeprecatedIn43DeprecatedIn37rB   rL   r3   r   r   <module>rW      s  
 #  M!
 !/! //! /
!# 
!   C 
		   C 
		   C 
		   	C 
		   C 
		   C 
		! !,
!
 
!r   