o
    ÍtBhÎ  ã                   @   s<   d Z ddlmZ dedefdd„Zdededefd	d
„ZdS )zPython compatibility wrappers.é    ©ÚpackÚnumÚreturnc                 C   s
   t d| ƒS )zÝ
    Converts a number between 0 and 255 (both inclusive) to a base-256 (byte)
    representation.

    :param num:
        An unsigned integer between 0 and 255 (both inclusive).
    :returns:
        A single byte.
    ÚBr   )r   © r   úb/var/www/html/riverr-enterprise-integrations-main/venv/lib/python3.10/site-packages/rsa/_compat.pyÚbyte   s   

r	   Úb1Úb2c                 C   s   t dd„ t| |ƒD ƒƒS )a   
    Returns the bitwise XOR result between two bytes objects, b1 ^ b2.

    Bitwise XOR operation is commutative, so order of parameters doesn't
    generate different results. If parameters have different length, extra
    length of the largest one is ignored.

    :param b1:
        First bytes object.
    :param b2:
        Second bytes object.
    :returns:
        Bytes object, result of XOR operation.
    c                 s   s    | ]	\}}||A V  qd S )Nr   )Ú.0ÚxÚyr   r   r   Ú	<genexpr>0   s   € zxor_bytes.<locals>.<genexpr>)ÚbytesÚzip)r
   r   r   r   r   Ú	xor_bytes!   s   r   N)Ú__doc__Ústructr   Úintr   r	   r   r   r   r   r   Ú<module>   s   