U
    aX                     @   s   d Z ddlZddlZddlZejd dkZer8eZeZ	ne
ZeZ	ee	fZzddlmZmZ W n$ ek
r   ddlmZmZ Y nX z
ejZW n ek
r   dd ZY nX eeddrdd	 Zn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   y/home/adriano.carvalho/ftp/files/BrinquedotecaVirtual/brinquedotecavirtual/venv/lib/python3.8/site-packages/jwt/compat.pyconstant_time_compare!   s    r   to_bytesc                 C   s2   | }d}|dkr"|d? }|d7 }q| j |dddS )Nr         bigF)signed)r   )val	remainingZbyte_lengthr   r   r   bytes_from_int3   s    
r   c                 C   sB   g }| r"t | d\} }|| q|  tjdt| f| 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>   s*   


