Ë
    ö­¦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                  «       }||k(  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     €úL/var/www/html/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)r   r   r   ÚsecretÚcheck_stringÚhmac_strings     `   r   Úcheck_signaturer      sy   ø€ ô �^‰^˜EŸL™L¨Ó1Ó2€FØ—9‘9ÓH¼À»ÔHÓH€LÜ—(‘(Ø�‰‹Ø×Ñ˜GÓ$Ü—.‘.ô÷ �iƒkð	 ð
 ˜$ÑÐó    Ú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'      sQ   ðÛ Û Ý ð˜3ð  cð °Sð ¸Tó ð*	*˜3ð 	* d¨3°¨8¡nð 	*¸ô 	*r   