ó
    Û°›j  ã                  óZ  • S SK Jr  S SKrS SKJr  S SKJrJr  S SKJ	r	J
r
   " S S\R                  S9r " S	 S
\\R                  S9r " S S\\R                  S9r " S S\\R                  S9r " S S\\R                  S9rSS jr      SS jr        SS jr      SS jrg)é    )ÚannotationsN)Úutils)ÚUnsupportedAlgorithmÚ_Reasons)ÚBlockCipherAlgorithmÚCipherAlgorithmc                  ón   • \ rS rSr\\R                  SS j5       5       r\R                  SS j5       rSr	g)ÚModeé   c                ó   • g)z0
A string naming this mode (e.g. "ECB", "CBC").
N© ©Úselfs    Úb/home/mande/repo/quber/.venv/lib/python3.13/site-packages/cryptography/hazmat/primitives/_modes.pyÚnameÚ	Mode.name   ó   � ó    c                ó   • g)zY
Checks that all the necessary invariants of this (mode, algorithm)
combination are met.
Nr   ©r   Ú	algorithms     r   Úvalidate_for_algorithmÚMode.validate_for_algorithm   r   r   r   N)ÚreturnÚstr)r   r   r   ÚNone)
Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__ÚpropertyÚabcÚabstractmethodr   r   Ú__static_attributes__r   r   r   r
   r
      s<   † ØØ×Ñóó ó ðð
 	×Ñóó ór   r
   )Ú	metaclassc                  óF   • \ rS rSr\\R                  SS j5       5       rSrg)ÚModeWithInitializationVectoré!   c                ó   • g)z@
The value of the initialization vector for this mode as bytes.
Nr   r   s    r   Úinitialization_vectorÚ2ModeWithInitializationVector.initialization_vector"   r   r   r   N©r   úutils.Buffer)	r   r   r   r    r!   r"   r#   r*   r$   r   r   r   r'   r'   !   ó"   † ØØ×Ñóó ó ór   r'   c                  óF   • \ rS rSr\\R                  SS j5       5       rSrg)ÚModeWithTweaké*   c                ó   • g)z0
The value of the tweak for this mode as bytes.
Nr   r   s    r   ÚtweakÚModeWithTweak.tweak+   r   r   r   Nr,   )	r   r   r   r    r!   r"   r#   r3   r$   r   r   r   r0   r0   *   r.   r   r0   c                  óF   • \ rS rSr\\R                  SS j5       5       rSrg)ÚModeWithNonceé3   c                ó   • g)z0
The value of the nonce for this mode as bytes.
Nr   r   s    r   ÚnonceÚModeWithNonce.nonce4   r   r   r   Nr,   )	r   r   r   r    r!   r"   r#   r9   r$   r   r   r   r6   r6   3   r.   r   r6   c                  óF   • \ rS rSr\\R                  SS j5       5       rSrg)ÚModeWithAuthenticationTagé<   c                ó   • g)z@
The value of the tag supplied to the constructor of this mode.
Nr   r   s    r   ÚtagÚModeWithAuthenticationTag.tag=   r   r   r   N)r   zbytes | None)	r   r   r   r    r!   r"   r#   r?   r$   r   r   r   r<   r<   <   r.   r   r<   c                ó\   • UR                   S:”  a  UR                  S:X  a  [        S5      eg g )Né   ÚAESz=Only 128, 192, and 256 bit keys are allowed for this AES mode)Úkey_sizer   Ú
ValueErrorr   s     r   Ú_check_aes_key_lengthrF   E   s3   € Ø×Ñ˜CÓ I§N¡N°eÓ$;ÜØKó
ð 	
ð %<Ðr   c                óŒ   • [        U R                  5      nUS-  UR                  :w  a  [        SU SU R                   S35      eg )Né   zInvalid IV size (ú) for Ú.)Úlenr*   Ú
block_sizerE   r   )r   r   Úiv_lens      r   Ú_check_iv_lengthrN   L   sJ   € ô �×+Ñ+Ó,€FØ��z�Y×)Ñ)Ó)ÜÐ,¨V¨H°F¸4¿9¹9¸+ÀQÐGÓHÐHð *r   c                óÖ   • [        U[        5      (       d  [        U S3[        R                  5      e[        U 5      S-  UR                  :w  a  [        S[        U 5       SU S35      eg )Nú" requires a block cipher algorithmrH   zInvalid nonce size (rI   rJ   )Ú
isinstancer   r   r   ÚUNSUPPORTED_CIPHERrK   rL   rE   )r9   r   r   s      r   Ú_check_nonce_lengthrS   T   so   € ô �iÔ!5×6Ñ6Ü"ØˆfÐ6Ð7Ü×'Ñ'ó
ð 	
ô ˆ5ƒz�A�~˜×-Ñ-Ó-ÜÐ/´°E³
¨|¸6À$ÀÀqÐIÓJÐJð .r   c                ó”   • [        U[        5      (       d  [        U  S3[        R                  5      e[        X5        [        X5        g )NrP   )rQ   r   r   r   rR   rF   rN   r   s     r   Ú_check_iv_and_key_lengthrU   `   sE   € ô �iÔ!5×6Ñ6Ü"ØˆfÐ6Ð7Ü×'Ñ'ó
ð 	
ô ˜$Ô*Ü�TÕ%r   )r   r
   r   r   r   r   )r   r'   r   r   r   r   )r9   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'   r0   r6   r<   rF   rN   rS   rU   r   r   r   Ú<module>r[      sÝ   ðõ
 #ã 
å ß B÷ô�S—[‘[ò ô  4°3·;±;ò ô�D C§K¡Kò ô�D C§K¡Kò ô °·±ò ô
ðIØ
&ðIØ3GðIà	ôIð	KØð	KØ"ð	KØ/>ð	Kà	ô	Kð	&Ø
&ð	&Ø3Bð	&à	õ	&r   