
     h3                         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    rddlmZ nddlmZ d	d
gZd ZdS )    )unicode_literalsdivisionabsolute_importprint_functionN   )pretty_message)	type_namebyte_clsdarwin)
rand_byteswin32constant_comparer   c                    t          | t                    s*t          t          dt	          |                               t          |t                    s*t          t          dt	          |                              t          |           t          |          k    rdS t          j        dk     rd | D             } d |D             }d}t          | |          D ]\  }}|||z  z  }|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                 ,    g | ]}t          |          S  ord.0chars     I/var/www/html/Sam_Eipo/venv/lib/python3.11/site-packages/oscrypto/util.py
<listcomp>z$constant_compare.<locals>.<listcomp>9       %%%4SYY%%%    c                 ,    g | ]}t          |          S r   r   r   s     r   r   z$constant_compare.<locals>.<listcomp>:   r   r   r   )	
isinstancer
   	TypeErrorr   r	   lensysversion_infozip)abresultxys        r   r   r      s    a""  aLL	
 
   	 a""  aLL	
 
   	 1vvQu
$%%1%%%%%1%%%FAq		  1!a%Q;r   )
__future__r   r   r   r   r    _errorsr   _typesr	   r
   platform	_mac.utilr   	_win.util_openssl.util__all__r   r   r   r   <module>r0      s    R R R R R R R R R R R R 



 # # # # # # ' ' ' ' ' ' ' '<8%%%%%%%\W%%%%%%%)))))) ( ( ( ( (r   