
    Bwg3                         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y)    )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        |      k7  ryt        j                  dk  r0| D cg c]  }t        |       } }|D cg c]  }t        |       }}d}t        | |      D ]  \  }}|||z  z  } |dk(  S c c}w c c}w )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)   r   )

isinstancer
   	TypeErrorr   r	   lensysversion_infoordzip)abcharresultxys         D/var/www/horilla/myenv/lib/python3.12/site-packages/oscrypto/util.pyr   r      s     a" aL	
  	 a" aL	
  	 1vQ
$#$%4SY%%#$%4SY%%FAq	 1!a%Q; &%s   C$C )
__future__r   r   r   r   r   _errorsr   _typesr	   r
   platform	_mac.utilr   	_win.util_openssl.util__all__r        r   <module>r)      sI    R R 
 # '<<8%\\W%) (r(   