JFIF$        dd7 

Viewing File: /opt/imunify360/venv/lib/python3.11/site-packages/Crypto/Util/__pycache__/py3compat.cpython-311.pyc

�

��f���~��J�dZddlZddlZejddkrGd�Zd�Zd�Zd�Zd"d	�Zd
�Z	d�Z
ddlmZeZdd
lm
Z
eZd�Zd�Zd�Zejdefddi��ZeZn;d�Zd�Zd�Zd�Zd"d�Zd�Z	d�Z
ddlmZddlmZddlmZ
eZd�Zd�Zd�Zdd lmZeZd!�Z[[dS)#a�Compatibility code for handling string/bytes changes from Python 2.x to Py3k

In Python 2.x, strings (of type ''str'') contain binary data, including encoded
Unicode text (e.g. UTF-8).  The separate type ''unicode'' holds Unicode text.
Unicode literals are specified via the u'...' prefix.  Indexing or slicing
either type always produces a string of the same type as the original.
Data read from a file is always of '''str'' type.

In Python 3.x, strings (type ''str'') may only contain Unicode text. The u'...'
prefix and the ''unicode'' type are now redundant.  A new type (called
''bytes'') has to be used for binary data (including any particular
''encoding'' of a string).  The b'...' prefix allows one to specify a binary
literal.  Indexing or slicing a string produces another string.  Slicing a byte
string produces another byte string, but the indexing operation produces an
integer.  Data read from a file is of '''str'' type if the file was opened in
text mode, or of ''bytes'' type otherwise.

Since PyCrypto aims at supporting both Python 2.x and 3.x, the following helper
functions are used to keep the rest of the library as independent as possible
from the actual Python version.

In general, the code should always deal with binary strings, and use integers
instead of 1-byte character strings.

b(s)
    Take a text string literal (with no prefix or with u'...' prefix) and
    make a byte string.
bchr(c)
    Take an integer and make a 1-character byte string.
bord(c)
    Take the result of indexing on a byte string and make an integer.
tobytes(s)
    Take a text string, a byte string, or a sequence of character taken from
    a byte string and make a byte string.
�N�c��|S�N���ss �w/builddir/build/BUILD/imunify360-venv-2.6.0/opt/imunify360/venv/lib64/python3.11/site-packages/Crypto/Util/py3compat.py�br
B�����c� �t|��Sr)�chrrs r	�bchrrD�
���1�v�v�
rc� �t|��Sr)�strrs r	�bstrrFrrc� �t|��Sr)�ordrs r	�bordrHrr�latin-1c�H�t|t��r|�|��St|t��r|St|t��rt|��St|t��r|���Sd�|��S)N�)	�
isinstance�unicode�encoder�	bytearray�bytes�
memoryview�tobytes�join�r�encodings  r	r r Js����a��!�!�		��8�8�H�%�%�%�
��3�
�
�	��H�
��9�
%�
%�	���8�8�O�
��:�
&�
&�	��9�9�;�;���7�7�1�:�:�rc��|Srr��bss r	�tostrr'Us���	rc�,�t|t��Sr�rrrs r	�byte_stringr*W����!�S�!�!�!r)�StringIO)�maxintc�:�t|ttf��Sr)r�int�long��xs r	�
is_native_intr3as���!�c�4�[�)�)�)rc�,�t|t��Sr)r�
basestringr1s r	�	is_stringr6ds���!�Z�(�(�(rc��t|t��p)t|t��pt|t��Sr)rrrrr1s r	�is_bytesr8gs8���!�S�!�!�*��1�i�(�(�*��1�j�)�)�	*r�ABC�	__slots__rc�,�|�d��S�Nr)rrs r	r
r
qs���h�h�y�!�!�!rc�"�t|g��Sr)rrs r	rrss���a�S�z�z�rc�j�t|t��rt|d��St|��Sr<)rrrrs r	rrus/���a����	���9�%�%�%���8�8�Orc��|Srrrs r	rrzrrc�>�t|t��r|St|t��rt|��St|t��r|�|��St|t
��r|���St|g��Sr)rrrrrrr r"s  r	r r |s����a����		��H�
��9�
%�
%�	���8�8�O�
��#�
�
�	��8�8�H�%�%�%�
��:�
&�
&�	��9�9�;�;���!��:�:�rc�,�|�d��Sr<)�decoder%s r	r'r'�s���y�y��#�#�#rc�,�t|t��Sr)rrrs r	r*r*�s���!�U�#�#�#r)�BytesIO)�maxsizec�,�t|t��Sr)rr/r1s r	r3r3�r+rc�,�t|t��Srr)r1s r	r6r6�r+rc��t|t��p)t|t��pt|t��Sr)rrrrr1s r	r8r8�s8���!�U�#�#�*��1�i�(�(�*��1�j�)�)�	*r)r9c���t|t��r|||����St|t��rt	|||���S|||�S)zrReturn an immutable copy of a sequence (byte string, byte array, memoryview)
    in a certain interval [start:seq])rrr rr)�start�end�seqs   r	�_copy_bytesrM�sf���#�z�"�"���5��9�~�%�%�'�'�'�	�C��	#�	#���S��s��^�$�$�$��5��9�~�r)r)�__doc__�sys�abc�version_infor
rrrr r'r*r,rDr-�xrange�
iter_ranger3r6r8�ABCMeta�objectr9�IOError�FileNotFoundError�iorE�rangerMrrr	�<module>rZs8��2"�"�H�
�
�
�
�
�
�
���A��!���������������
�
�
�
����"�"�"�"�!�!�!�!�!��G��������J�*�*�*�)�)�)�*�*�*�
�#�+�e�f�Y��b�(9�
:�
:�C����"�"�"�������
���
�
�
�
�$�$�$�$�$�$�������������%�%�%�%�%�%��J�"�"�"�"�"�"�*�*�*�
������)��	�	�	���C�Cr
Back to Directory  nL+D550H?Mx ,D"v]qv;6*Zqn)ZP0!1 A "#a$2Qr D8 a Ri[f\mIykIw0cuFcRı?lO7к_f˓[C$殷WF<_W ԣsKcëIzyQy/_LKℂ;C",pFA:/]=H  ~,ls/9ć:[=/#f;)x{ٛEQ )~ =𘙲r*2~ a _V=' kumFD}KYYC)({ *g&f`툪ry`=^cJ.I](*`wq1dđ#̩͑0;H]u搂@:~וKL Nsh}OIR*8:2 !lDJVo(3=M(zȰ+i*NAr6KnSl)!JJӁ* %݉?|D}d5:eP0R;{$X'xF@.ÊB {,WJuQɲRI;9QE琯62fT.DUJ;*cP A\ILNj!J۱+O\͔]ޒS߼Jȧc%ANolՎprULZԛerE2=XDXgVQeӓk yP7U*omQIs,K`)6\G3t?pgjrmۛجwluGtfh9uyP0D;Uڽ"OXlif$)&|ML0Zrm1[HXPlPR0'G=i2N+0e2]]9VTPO׮7h(F*癈'=QVZDF,d߬~TX G[`le69CR(!S2!P <0x<!1AQ "Raq02Br#SCTb ?Ζ"]mH5WR7k.ۛ!}Q~+yԏz|@T20S~Kek *zFf^2X*(@8r?CIuI|֓>^ExLgNUY+{.RѪ τV׸YTD I62'8Y27'\TP.6d&˦@Vqi|8-OΕ]ʔ U=TL8=;6c| !qfF3aů&~$l}'NWUs$Uk^SV:U# 6w++s&r+nڐ{@29 gL u"TÙM=6(^"7r}=6YݾlCuhquympǦ GjhsǜN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