Ë
    S"“j_  ã                   ó<   — d Z ddlZddlmZ ddlmZ  G d„ d«      Zy)z&
This module holds the AuthKey class.
é    N)Úsha1é   )ÚBinaryReaderc                   ó\   — e Zd ZdZd„ Zed„ «       Zej                  d„ «       Zd„ Zd„ Z	d„ Z
y)	ÚAuthKeyzt
    Represents an authorization key, used to encrypt and decrypt
    messages sent to Telegram's data centers.
    c                 ó   — || _         y)z|
        Initializes a new authorization key.

        :param data: the data in bytes that represent this auth key.
        N)Úkey)ÚselfÚdatas     úX/var/www/api.ozpay.ru/ozpay/venv/lib/python3.12/site-packages/telethon/crypto/authkey.pyÚ__init__zAuthKey.__init__   s   € ð ˆ�ó    c                 ó   — | j                   S ©N)Ú_key©r
   s    r   r	   zAuthKey.key   s   € à�y‰yÐr   c                 óÖ  — |sd x| _         x| _        | _        y t        |t	        | «      «      r5|j                   |j                  |j                  c| _         | _        | _        y || _         t        t        | j                   «      j                  «       «      5 }|j                  d¬«      | _        |j                  d«       |j                  d¬«      | _        d d d «       y # 1 sw Y   y xY w)NF©Úsignedé   )
r   Úaux_hashÚkey_idÚ
isinstanceÚtyper   r   ÚdigestÚ	read_longÚread)r
   ÚvalueÚreaders      r   r	   zAuthKey.key   s¾   € áØ6:Ð:ˆDŒIÐ:˜œ¨¬Øä�eœT $›ZÔ(à—
‘
˜EŸN™N¨E¯L©Lð 2ˆDŒI�t”} d¤kààˆŒ	Üœ$˜tŸy™y›/×0Ñ0Ó2Ó3ð 	9°vØ"×,Ñ,°EÐ,Ó:ˆDŒMØ�K‰K˜ŒNØ ×*Ñ*°%Ð*Ó8ˆDŒK÷	9÷ 	9ñ 	9ús   ÂA CÃC(c                 óÖ   — |j                  ddd¬«      }|t        j                  d|| j                  «      z   }t        j                  t        |«      j                  «       dd dd¬«      S )zô
        Calculates the new nonce hash based on the current attributes.

        :param new_nonce: the new nonce to be hashed.
        :param number: number to prepend before the hash.
        :return: the hash for the given new nonce.
        é    ÚlittleTr   z<BQr   é   )Úto_bytesÚstructÚpackr   ÚintÚ
from_bytesr   r   )r
   Ú	new_nonceÚnumberr   s       r   Úcalc_new_nonce_hashzAuthKey.calc_new_nonce_hash-   sa   € ð ×&Ñ& r¨8¸DÐ&ÓAˆ	Øœ6Ÿ;™; u¨f°d·m±mÓDÑDˆô �~‰~œd 4›j×/Ñ/Ó1°!°BÐ7¸È$ˆ~ÓOÐOr   c                 ó,   — t        | j                  «      S r   )Úboolr   r   s    r   Ú__bool__zAuthKey.__bool__;   s   € Ü�D—I‘I‹Ðr   c                 ób   — t        |t        | «      «      xr |j                  | j                  k(  S r   )r   r   r	   r   )r
   Úothers     r   Ú__eq__zAuthKey.__eq__>   s%   € Ü˜%¤ d£Ó,ÒG°·±¸d¿i¹iÑ1GÐGr   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Úpropertyr	   Úsetterr+   r.   r1   © r   r   r   r   
   sI   „ ñòð ñó ðð 	‡Z�Zñ9ó ð9ò"PòóHr   r   )r5   r%   Úhashlibr   Ú
extensionsr   r   r8   r   r   ú<module>r;      s!   ðñó Ý å %÷5Hò 5Hr   