
­­­­­­­­­­­­­­­­­­
<!DOCTYPE html>
<html>
3
kZ                 @   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y
ejZW n ek
rn   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   c             C   sL   t | t |krdS d}x*t| |D ]\}}|t|t|A O }q$W |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	   /usr/lib/python3.6/compat.pyconstant_time_compare   s    r   to_bytesc             C   s6   | }d}x|dkr$|d? }|d7 }q
W | j |dddS )Nr         ZbigF)Zsigned)r   )valZ	remainingZbyte_lengthr	   r	   r
   bytes_from_int.   s    
r   c             C   sF   g }x | r$t | d\} }|j| qW |j  tjdt| f| S )N   z%sB)divmodappendreversestructpackr   )r   ZbufZ	remainderr	   r	   r
   r   8   s    )__doc__Zhmacr   sysversion_infoZPY3strZ	text_typebytesZbinary_typeZunicodeZstring_typesZcompare_digestr   AttributeErrorgetattrintr   r	   r	   r	   r
   <module>   s"   


