o
    hX                     @   s   d Z ddlZddlZddlZejd dkZereZeZ	ne
ZeZ	ee	fZz
ddlmZmZ W n ey?   ddlmZmZ Y nw zejZW n eyR   dd ZY nw eeddr_dd	 ZdS d
d	 ZdS )z
The `compat` module provides support for backwards compatibility with older
versions of python, and compatibility wrappers around optional packages.
    N   )IterableMappingc                 C   sH   t | t |kr
dS d}t| |D ]\}}|t|t|A O }q|dkS )z
        Returns True if the two strings are equal, False otherwise.

        The time taken is independent of the number of characters that match.
        Fr   )lenzipord)Zval1Zval2resultxy r   R/var/www/html/magazine_api/magazine_env/lib/python3.10/site-packages/jwt/compat.pyconstant_time_compare!   s   r   to_bytesc                 C   s8   | }d}|dkr|d? }|d7 }|dks| j |dddS )Nr         bigF)signed)r   )val	remainingZbyte_lengthr   r   r   bytes_from_int3   s   r   c                 C   sF   g }| rt | d\} }|| | s|  tjdt| g|R  S )N   z%sB)divmodappendreversestructpackr   )r   buf	remainderr   r   r   r   =   s   
)__doc__hmacr   sysversion_infoPY3str	text_typebytesbinary_typeunicodestring_typescollections.abcr   r   ImportErrorcollectionscompare_digestr   AttributeErrorgetattrintr   r   r   r   r   <module>   s0    

