§
    ¥”j  ã                  ó6  — d dl mZ d dlZd dlmZ d dlmZmZ d dlm	Z	m
Z
  G d„ dej        ¬¦  «        Z G d	„ d
eej        ¬¦  «        Z G d„ deej        ¬¦  «        Z G d„ deej        ¬¦  «        Z G d„ deej        ¬¦  «        Zdd„Zd d„Zd!d„Zd"d„ZdS )#é    )ÚannotationsN)Úutils)ÚUnsupportedAlgorithmÚ_Reasons)ÚBlockCipherAlgorithmÚCipherAlgorithmc                  ób   — e Zd Zeej        d	d„¦   «         ¦   «         Zej        d
d„¦   «         ZdS )ÚModeÚreturnÚstrc                ó   — dS )z@
        A string naming this mode (e.g. "ECB", "CBC").
        N© ©Úselfs    út/var/www/finuniver-perm.ru/html/portfolio/venv/lib/python3.11/site-packages/cryptography/hazmat/primitives/_modes.pyÚnamez	Mode.name   ó   € € € ó    Ú	algorithmr   ÚNonec                ó   — dS )zq
        Checks that all the necessary invariants of this (mode, algorithm)
        combination are met.
        Nr   ©r   r   s     r   Úvalidate_for_algorithmzMode.validate_for_algorithm   r   r   N)r   r   )r   r   r   r   )Ú__name__Ú
__module__Ú__qualname__ÚpropertyÚabcÚabstractmethodr   r   r   r   r   r
   r
      sd   € € € € € ØØÔðð ð ñ Ôñ „Xðð
 	Ôðð ð ñ Ôðð ð r   r
   )Ú	metaclassc                  ó@   — e Zd Zeej        dd„¦   «         ¦   «         ZdS )ÚModeWithInitializationVectorr   úutils.Bufferc                ó   — dS )zP
        The value of the initialization vector for this mode as bytes.
        Nr   r   s    r   Úinitialization_vectorz2ModeWithInitializationVector.initialization_vector"   r   r   N©r   r#   )r   r   r   r   r   r   r%   r   r   r   r"   r"   !   ó@   € € € € € ØØÔðð ð ñ Ôñ „Xðð ð r   r"   c                  ó@   — e Zd Zeej        dd„¦   «         ¦   «         ZdS )ÚModeWithTweakr   r#   c                ó   — dS )z@
        The value of the tweak for this mode as bytes.
        Nr   r   s    r   ÚtweakzModeWithTweak.tweak+   r   r   Nr&   )r   r   r   r   r   r   r+   r   r   r   r)   r)   *   r'   r   r)   c                  ó@   — e Zd Zeej        dd„¦   «         ¦   «         ZdS )ÚModeWithNoncer   r#   c                ó   — dS )z@
        The value of the nonce for this mode as bytes.
        Nr   r   s    r   ÚnoncezModeWithNonce.nonce4   r   r   Nr&   )r   r   r   r   r   r   r/   r   r   r   r-   r-   3   r'   r   r-   c                  ó@   — e Zd Zeej        dd„¦   «         ¦   «         ZdS )ÚModeWithAuthenticationTagr   úbytes | Nonec                ó   — dS )zP
        The value of the tag supplied to the constructor of this mode.
        Nr   r   s    r   ÚtagzModeWithAuthenticationTag.tag=   r   r   N)r   r2   )r   r   r   r   r   r   r4   r   r   r   r1   r1   <   r'   r   r1   r   r   r   r   r   c                óT   — |j         dk    r|j        dk    rt          d¦  «        ‚d S d S )Né   ÚAESz=Only 128, 192, and 256 bit keys are allowed for this AES mode)Úkey_sizer   Ú
ValueErrorr   s     r   Ú_check_aes_key_lengthr:   E   s?   € ØÔ˜CÒÐ I¤N°eÒ$;Ð$;ÝØKñ
ô 
ð 	
ð  ÐÐ$;Ð$;r   r   c                ó€   — t          | j        ¦  «        }|dz  |j        k    rt          d|› d| j        › d�¦  «        ‚d S )Né   zInvalid IV size (ú) for ú.)Úlenr%   Ú
block_sizer9   r   )r   r   Úiv_lens      r   Ú_check_iv_lengthrB   L   sR   € õ �Ô+Ñ,Ô,€FØ��z�YÔ)Ò)Ð)ÝÐG¨VÐGÐG¸4¼9ÐGÐGÐGÑHÔHÐHð *Ð)r   r/   r#   r   r   c                óæ   — t          |t          ¦  «        st          |› d�t          j        ¦  «        ‚t          | ¦  «        dz  |j        k    r#t          dt          | ¦  «        › d|› d�¦  «        ‚d S )Nú" requires a block cipher algorithmr<   zInvalid nonce size (r=   r>   )Ú
isinstancer   r   r   ÚUNSUPPORTED_CIPHERr?   r@   r9   )r/   r   r   s      r   Ú_check_nonce_lengthrG   T   s…   € õ �iÕ!5Ñ6Ô6ð 
Ý"ØÐ7Ð7Ð7ÝÔ'ñ
ô 
ð 	
õ ˆ5�z„z�A�~˜Ô-Ò-Ð-ÝÐIµ°E±
´
ÐIÐIÀ$ÐIÐIÐIÑJÔJÐJð .Ð-r   c                óª   — t          |t          ¦  «        st          | › d�t          j        ¦  «        ‚t          | |¦  «         t          | |¦  «         d S )NrD   )rE   r   r   r   rF   r:   rB   r   s     r   Ú_check_iv_and_key_lengthrI   `   sc   € õ �iÕ!5Ñ6Ô6ð 
Ý"ØÐ7Ð7Ð7ÝÔ'ñ
ô 
ð 	
õ ˜$ 	Ñ*Ô*Ð*Ý�T˜9Ñ%Ô%Ð%Ð%Ð%r   )r   r
   r   r   r   r   )r   r"   r   r   r   r   )r/   r#   r   r   r   r   r   r   )r   r"   r   r   r   r   )Ú
__future__r   r   Úcryptographyr   Úcryptography.exceptionsr   r   Ú/cryptography.hazmat.primitives._cipheralgorithmr   r   ÚABCMetar
   r"   r)   r-   r1   r:   rB   rG   rI   r   r   r   ú<module>rO      sÓ  ðð
 #Ð "Ð "Ð "Ð "Ð "à 
€
€
€
à Ð Ð Ð Ð Ð Ø BÐ BÐ BÐ BÐ BÐ BÐ BÐ Bðð ð ð ð ð ð ð ðð ð ð ð �S”[ð ñ ô ð ð ð ð ð ð  4°3´;ð ñ ô ð ðð ð ð ð �D C¤Kð ñ ô ð ðð ð ð ð �D C¤Kð ñ ô ð ðð ð ð ð  °´ð ñ ô ð ð
ð 
ð 
ð 
ðIð Ið Ið Ið	Kð 	Kð 	Kð 	Kð	&ð 	&ð 	&ð 	&ð 	&ð 	&r   