§
    ¥”j�  ã                  ó‚  — d dl mZ d dlZd dlZd dlmZ d dlmZ d dl	m
Z
 d dl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 ej        dej        e
j                 d¬¦  «        Z G d„ dej        e         ¦  «        Zeej        e
j        e
j        e
j        e
j        df                  Ze                     ej        j        ¦  «         e                     ej        j        ¦  «         e                     ej        j        ¦  «         dS )é    )ÚannotationsN)Úopenssl)ÚCipherAlgorithm)Úmodes)ÚBufferc                  ó–   — e Zd Zej        dd„¦   «         Zej        dd„¦   «         Zej        dd	„¦   «         Zej        dd„¦   «         ZdS )ÚCipherContextÚdatar   ÚreturnÚbytesc                ó   — dS )zk
        Processes the provided bytes through the cipher and returns the results
        as bytes.
        N© ©Úselfr
   s     úz/var/www/finuniver-perm.ru/html/portfolio/venv/lib/python3.11/site-packages/cryptography/hazmat/primitives/ciphers/base.pyÚupdatezCipherContext.update   ó   € € € ó    ÚbufÚintc                ó   — dS )z“
        Processes the provided bytes and writes the resulting data into the
        provided buffer. Returns the number of bytes written.
        Nr   )r   r
   r   s      r   Úupdate_intozCipherContext.update_into   r   r   c                ó   — dS )zM
        Returns the results of processing the final block as bytes.
        Nr   ©r   s    r   ÚfinalizezCipherContext.finalize   r   r   ÚnonceÚNonec                ó   — dS )zÈ
        Resets the nonce for the cipher context to the provided value.
        Raises an exception if it does not support reset or if the
        provided nonce does not have a valid length.
        Nr   )r   r   s     r   Úreset_noncezCipherContext.reset_nonce%   r   r   N)r
   r   r   r   )r
   r   r   r   r   r   ©r   r   )r   r   r   r   )	Ú__name__Ú
__module__Ú__qualname__ÚabcÚabstractmethodr   r   r   r   r   r   r   r	   r	      s¢   € € € € € ØÔðð ð ñ Ôðð 	Ôðð ð ñ Ôðð 	Ôðð ð ñ Ôðð
 	Ôðð ð ñ Ôðð ð r   r	   )Ú	metaclassc                  ó0   — e Zd Zej        dd„¦   «         ZdS )ÚAEADCipherContextr
   r   r   r   c                ó   — dS )z3
        Authenticates the provided bytes.
        Nr   r   s     r   Úauthenticate_additional_dataz.AEADCipherContext.authenticate_additional_data/   r   r   N)r
   r   r   r   )r!   r"   r#   r$   r%   r*   r   r   r   r(   r(   .   s6   € € € € € ØÔðð ð ñ Ôðð ð r   r(   c                  ó0   — e Zd Zej        dd„¦   «         ZdS )ÚAEADDecryptionContextÚtagr   r   c                ó   — dS )zŠ
        Returns the results of processing the final block as bytes and allows
        delayed passing of the authentication tag.
        Nr   )r   r-   s     r   Úfinalize_with_tagz'AEADDecryptionContext.finalize_with_tag7   r   r   N)r-   r   r   r   )r!   r"   r#   r$   r%   r/   r   r   r   r,   r,   6   s6   € € € € € ØÔðð ð ñ Ôðð ð r   r,   c                  ó@   — e Zd Zeej        dd„¦   «         ¦   «         ZdS )ÚAEADEncryptionContextr   r   c                ó   — dS )zb
        Returns tag bytes. This is only available after encryption is
        finalized.
        Nr   r   s    r   r-   zAEADEncryptionContext.tag@   r   r   Nr    )r!   r"   r#   Úpropertyr$   r%   r-   r   r   r   r1   r1   ?   s@   € € € € € ØØÔðð ð ñ Ôñ „Xðð ð r   r1   ÚModeT)ÚboundÚ	covariantc                  ó®   — e Zd Z	 ddd
„Zej        dd„¦   «         Zej        dd„¦   «         Zd„ Zej        dd„¦   «         Zej        dd„¦   «         Zd„ ZdS )ÚCipherNÚ	algorithmr   Úmoder4   Úbackendú
typing.Anyr   r   c                óÐ   — t          |t          ¦  «        st          d¦  «        ‚|�1t          |t          j        ¦  «        sJ ‚|                     |¦  «         || _        || _        d S )Nz&Expected interface of CipherAlgorithm.)Ú
isinstancer   Ú	TypeErrorr   r4   Úvalidate_for_algorithmr9   r:   )r   r9   r:   r;   s       r   Ú__init__zCipher.__init__O   sl   € õ ˜)¥_Ñ5Ô5ð 	FÝÐDÑEÔEÐEàÐõ ˜d¥E¤JÑ/Ô/Ð/Ð/Ð/Ø×'Ò'¨	Ñ2Ô2Ð2à"ˆŒØˆŒ	ˆ	ˆ	r   r   ú'Cipher[modes.ModeWithAuthenticationTag]r1   c                ó   — d S ©Nr   r   s    r   Ú	encryptorzCipher.encryptora   ó	   € ð !$ r   Ú_CIPHER_TYPEr	   c                ó   — d S rD   r   r   s    r   rE   zCipher.encryptorf   ó	   € ð ˜r   c                óÊ   — t          | j        t          j        ¦  «        r| j        j        �t          d¦  «        ‚t          j                             | j	        | j        ¦  «        S )Nz0Authentication tag must be None when encrypting.)
r>   r:   r   ÚModeWithAuthenticationTagr-   Ú
ValueErrorÚrust_opensslÚciphersÚcreate_encryption_ctxr9   r   s    r   rE   zCipher.encryptork   s^   € Ý�d”i¥Ô!@ÑAÔAð 	ØŒyŒ}Ð(Ý ØFñô ð õ Ô#×9Ò9ØŒN˜DœIñ
ô 
ð 	
r   r,   c                ó   — d S rD   r   r   s    r   Ú	decryptorzCipher.decryptorv   rF   r   c                ó   — d S rD   r   r   s    r   rQ   zCipher.decryptor{   rI   r   c                óV   — t           j                             | j        | j        ¦  «        S rD   )rM   rN   Úcreate_decryption_ctxr9   r:   r   s    r   rQ   zCipher.decryptor€   s&   € ÝÔ#×9Ò9ØŒN˜DœIñ
ô 
ð 	
r   rD   )r9   r   r:   r4   r;   r<   r   r   )r   rB   r   r1   )r   rG   r   r	   )r   rB   r   r,   )r!   r"   r#   rA   ÚtypingÚoverloadrE   rQ   r   r   r   r8   r8   N   sØ   € € € € € ð
 #ð	ð ð ð ð ð$ „_ð$ð $ð $ñ „_ð$ð „_ðð ð ñ „_ðð	
ð 	
ð 	
ð „_ð$ð $ð $ñ „_ð$ð „_ðð ð ñ „_ðð
ð 
ð 
ð 
ð 
r   r8   )Ú
__future__r   r$   rU   Ú"cryptography.hazmat.bindings._rustr   rM   Ú/cryptography.hazmat.primitives._cipheralgorithmr   Ú&cryptography.hazmat.primitives.ciphersr   Úcryptography.utilsr   ÚABCMetar	   r(   r,   r1   ÚTypeVarÚOptionalr4   ÚGenericr8   ÚUnionÚModeWithNonceÚModeWithTweakÚECBÚModeWithInitializationVectorrG   ÚregisterrN   r   r   r   ú<module>rf      s&  ðð
 #Ð "Ð "Ð "Ð "Ð "à 
€
€
€
Ø €€€à FÐ FÐ FÐ FÐ FÐ FØ KÐ KÐ KÐ KÐ KÐ KØ 8Ð 8Ð 8Ð 8Ð 8Ð 8Ø %Ð %Ð %Ð %Ð %Ð %ðð ð ð ð ˜cœkð ñ ô ð ð<ð ð ð ð ˜°´ð ñ ô ð ðð ð ð ð Ð-¸¼ð ñ ô ð ðð ð ð ð Ð-¸¼ð ñ ô ð ð €v„~Ø
�&”/ %¤*Ô-¸ðñ ô €ð
5
ð 5
ð 5
ð 5
ð 5
ˆVŒ^˜DÔ!ñ 5
ô 5
ð 5
ðp Ø
„LØÔØÔØŒ	ØÔ*Øð		ôô€ð × Ò �|Ô+Ô9Ñ :Ô :Ð :Ø × Ò ˜|Ô3ÔIÑ JÔ JÐ JØ × Ò ˜|Ô3ÔIÑ JÔ JÐ JÐ JÐ Jr   