Ë
    3ýj  ã                   óV   — d dl Z d dlZd dlmZ dedededefd„Zdedeeef   defd	„Zy)
é    N)ÚAnyÚtokenÚhashÚkwargsÚreturnc                 ó˜  ‡— t        j                  | j                  d«      «      }dj                  ˆfd„t	        ‰«      D «       «      }t        j                  |j                  «       |j                  d«      t         j                  ¬«      j                  «       }t        j                  |j                  «       |j                  «       «      S )a	  
    Generate hexadecimal representation
    of the HMAC-SHA-256 signature of the data-check-string
    with the SHA256 hash of the bot's token used as a secret key

    :param token:
    :param hash:
    :param kwargs: all params received on auth
    :return:
    zutf-8ú
c              3   ó2   •K  — | ]  }|› d ‰|   › �–— Œ y­w)ú=N© )Ú.0Úkr   s     €úS/root/telegram-saas/.venv/lib/python3.12/site-packages/aiogram/utils/auth_widget.pyú	<genexpr>z"check_signature.<locals>.<genexpr>   s    øè ø€ ÒH°A ˜s ! F¨1¡I ;Ô/ÑHùs   ƒ)Ú	digestmod)
ÚhashlibÚsha256ÚencodeÚjoinÚsortedÚhmacÚnewÚdigestÚ	hexdigestÚcompare_digest)r   r   r   ÚsecretÚcheck_stringÚhmac_strings     `   r   Úcheck_signaturer      s�   ø€ ô �^‰^˜EŸL™L¨Ó1Ó2€FØ—9‘9ÓH¼À»ÔHÓH€LÜ—(‘(Ø�‰‹Ø×Ñ˜GÓ$Ü—.‘.ô÷ �iƒkð	 ô
 ×Ñ˜{×1Ñ1Ó3°T·[±[³]ÓCÐCó    Údatac                 ó   — t        | fi |¤ŽS )zµ
    Verify the authentication and the integrity
    of the data received on user's auth

    :param token: Bot's token
    :param data: all data that came on auth
    :return:
    )r   )r   r!   s     r   Úcheck_integrityr#      s   € ô ˜5Ñ) DÑ)Ð)r    )	r   r   Útypingr   ÚstrÚboolr   Údictr#   r   r    r   ú<module>r(      sV   ðÛ Û Ý ðD˜3ð D cð D°Sð D¸Tó Dð*	*˜3ð 	* d¨3°¨8¡nð 	*¸ô 	*r    