|
Server : Apache System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64 User : njnconst ( 1116) PHP Version : 8.4.18 Disable Function : NONE Directory : /proc/self/root/opt/alt/python37/lib/python3.7/site-packages/jwt/__pycache__/ |
Upload File : |
B
�b�[X � @ s� d Z ddlZddlZddlZejd dkZer8eZeZ ne
ZeZ ee fZyddlm
Z
mZ W n$ ek
r� ddlm
Z
mZ Y nX y
ejZW n ek
r� dd� ZY nX eedd�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�Mappingc C sL t | �t |�krdS d}x*t| |�D ]\}}|t|�t|�A O }q$W |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 �;/opt/alt/python37/lib/python3.7/site-packages/jwt/compat.py�constant_time_compare! s r
�to_bytesc C s6 | }d}x|dkr$|d? }|d7 }q
W | j |ddd�S )Nr � � ZbigF)�signed)r )�valZ remainingZbyte_lengthr r r �bytes_from_int3 s
r c C sF g }x | r$t | d�\} }|�|� qW |�� tjdt|� f|�� S )N� z%sB)�divmod�append�reverse�struct�packr )r ZbufZ remainderr r r r = s )�__doc__Zhmacr �sys�version_infoZPY3�strZ text_type�bytesZbinary_typeZunicodeZstring_typesZcollections.abcr r �ImportError�collectionsZcompare_digestr
�AttributeError�getattr�intr r r r r �<module> s*