HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //snap/core20/2669/lib/python3/dist-packages/jwt/__pycache__/compat.cpython-38.pyc
U

�b�[X�@s�dZddlZddlZddlZejddkZer8eZeZ	ne
ZeZ	ee	fZzddlm
Z
mZWn$ek
r�ddlm
Z
mZYnXz
ejZWnek
r�dd�ZYnXeedd�r�dd	�Znd
d	�ZdS)z�
The `compat` module provides support for backwards compatibility with older
versions of python, and compatibility wrappers around optional packages.
�N�)�Iterable�MappingcCsHt|�t|�krdSd}t||�D]\}}|t|�t|�AO}q"|dkS)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)Zval1Zval2�result�x�y�r�,/usr/lib/python3/dist-packages/jwt/compat.py�constant_time_compare!sr
�to_bytescCs2|}d}|dkr"|d?}|d7}q|j|ddd�S)Nr��ZbigF)Zsigned)r)�valZ	remainingZbyte_lengthrrr�bytes_from_int3s
rcCsBg}|r"t|d�\}}|�|�q|��tjdt|�f|��S)N�z%sB)�divmod�append�reverse�structZpackr)rZbufZ	remainderrrrr=s)�__doc__Zhmacr�sys�version_infoZPY3�strZ	text_type�bytesZbinary_typeZunicodeZstring_typesZcollections.abcrr�ImportError�collectionsZcompare_digestr
�AttributeError�getattr�intrrrrr�<module>s*