o
    >e3                     @   s   d dl mZmZmZmZ d dlZddlmZ ddlm	Z	m
Z
 ejdkr*ddlmZ nejdkr6ddlmZ nddlmZ d	d
gZdd	 ZdS )    )unicode_literalsdivisionabsolute_importprint_functionN   )pretty_message)	type_namebyte_clsdarwin)
rand_byteswin32constant_comparer   c                 C   s   t | tsttdt| t |tsttdt|t| t|kr&dS tjdk r9dd | D } dd |D }d}t| |D ]
\}}|||A O }q@|dkS )	z
    Compares two byte strings in constant time to see if they are equal

    :param a:
        The first byte string

    :param b:
        The second byte string

    :return:
        A boolean if the two byte strings are equal
    z9
            a must be a byte string, not %s
            z9
            b must be a byte string, not %s
            F)   c                 S      g | ]}t |qS  ord.0charr   r   N/var/www/html/humari/django-venv/lib/python3.10/site-packages/oscrypto/util.py
<listcomp>9       z$constant_compare.<locals>.<listcomp>c                 S   r   r   r   r   r   r   r   r   :   r   r   )	
isinstancer	   	TypeErrorr   r   lensysversion_infozip)abresultxyr   r   r   r      s&   


)
__future__r   r   r   r   r   _errorsr   _typesr   r	   platform	_mac.utilr   	_win.util_openssl.util__all__r   r   r   r   r   <module>   s   

