AlkantarClanX12

Your IP : 3.137.218.176


Current Path : /opt/alt/python39/lib64/python3.9/__pycache__/
Upload File :
Current File : //opt/alt/python39/lib64/python3.9/__pycache__/base64.cpython-39.opt-2.pyc

a

R�f�M�@sjddlZddlZddlZgd�ZeefZdd�Zd?dd�Zd@dd	�Z	d
d�Z
dd
�Ze�dd�Z
e�dd�Zdd�Zdd�ZdZdadadd�ZdAdd�Zdd�ZdBdd�ZdadadZdZdCdd �Zddddd!�d"d#�Zddd$d%�d&d'�Zd(Zda da!da"dDd)d*�Z#d+d,�Z$d-Z%e%d.d/Z&d0d1�Z'd2d3�Z(d4d5�Z)d6d7�Z*d8d9�Z+d:d;�Z,d<d=�Z-e.d>k�rfe,�dS)E�N)�encode�decode�encodebytes�decodebytes�	b64encode�	b64decode�	b32encode�	b32decode�	b16encode�	b16decode�	b85encode�	b85decode�	a85encode�	a85decode�standard_b64encode�standard_b64decode�urlsafe_b64encode�urlsafe_b64decodecCsxt|t�r2z|�d�WSty0td��Yn0t|t�r@|Szt|���WStyrtd|j	j
�d�Yn0dS)N�asciiz4string argument should contain only ASCII charactersz>argument should be a bytes-like object or ASCII string, not %r)�
isinstance�strr�UnicodeEncodeError�
ValueError�bytes_types�
memoryview�tobytes�	TypeError�	__class__�__name__��s�r!�+/opt/alt/python39/lib64/python3.9/base64.py�_bytes_from_decode_data"s

��r#cCs,tj|dd�}|dur(|�t�d|��S|S)NF)�newline�+/)�binascii�
b2a_base64�	translate�bytes�	maketrans)r �altchars�encodedr!r!r"r3srFcCsNt|�}|dur*t|�}|�t�|d��}|rDt�d|�sDt�d��t�|�S)Nr%s[A-Za-z0-9+/]*={0,2}zNon-base64 digit found)	r#r(r)r*�re�	fullmatchr&�Error�
a2b_base64)r r+Zvalidater!r!r"rAs
rcCst|�S�N)rrr!r!r"rZsrcCst|�Sr1)rrr!r!r"rasrr%s-_cCst|��t�Sr1)rr(�_urlsafe_encode_translationrr!r!r"rosrcCst|�}|�t�}t|�Sr1)r#r(�_urlsafe_decode_translationrrr!r!r"rxs
rs ABCDEFGHIJKLMNOPQRSTUVWXYZ234567cs>tdur,dd�tD���fdd��D�ad�t|t�sBt|���}t|�d}|rb|dd|}t�}tj	}t}t
dt|�d�D]V}||||d�d�}|||d?||d	?d
@||d?d
@||d
@7}q�|dkr�d
|dd�<nF|dk�rd|dd�<n.|dk�r d|dd�<n|dk�r6d|dd�<t|�S)NcSsg|]}t|f��qSr!�r)��.0�ir!r!r"�
<listcomp>��zb32encode.<locals>.<listcomp>csg|]}�D]}||�qqSr!r!�r6�a�b�Zb32tabr!r"r8�r9��r�big��i��
�s======i�����s====����s===�����=���)�_b32tab2�_b32alphabetrrrr�len�	bytearray�int�
from_bytes�ranger))r �leftoverr,rQZb32tab2r7�cr!r=r"r�s<
��
�


rc
	Csxtdurdd�tt�D�at|�}t|�dr8t�d��|dur^t|�}|�t�	dd|��}|rj|�
�}t|�}|�d�}|t|�}t�}t}t
dt|�d�D]f}|||d�}d}	z|D]}
|	d	>||
}	q�Wnty�t�d
�d�Yn0||	�d	d�7}q�|d�s|dv�r(t�d��|�rp|�rp|	d	|K}	|	�d	d�}d
d	|d}|d|�|dd�<t|�S)NcSsi|]\}}||�qSr!r!)r6�k�vr!r!r"�
<dictcomp>�r9zb32decode.<locals>.<dictcomp>�zIncorrect paddings01�OrJrr>zNon-base32 digit foundr@>rrDrGrI��+���)�_b32rev�	enumeraterMr#rNr&r/r(r)r*�upper�rstriprOrR�KeyError�to_bytes)
r �casefoldZmap01�lZpadchars�decodedZb32revr7Zquanta�accrTZlastrSr!r!r"r	�s@


r	cCst�|���Sr1)r&Zhexlifyr_rr!r!r"r
�sr
cCs4t|�}|r|��}t�d|�r*t�d��t�|�S)Ns	[^0-9A-F]zNon-base16 digit found)r#r_r-�searchr&r/Z	unhexlify)r rcr!r!r"r�s

rs<~s~>c	s�t|t�st|���}t|�d}|r4|d|}t�dt|�d��|�}����fdd�|D�}|r�|s�|ddkr��dd	|d<|dd|�|d<d
�|�S)NrIr?z!%dIcsPg|]H}�r|sdn6�r$|dkr$dn&�|d�|dd�|d�qS)�zi    �yi�^	�Ui9r!)r6Zword��chars�chars2�foldnuls�
foldspacesr!r"r8!s�
�
�z_85encode.<locals>.<listcomp>rKrhrr>r9)	rrrrrN�struct�StructZunpack�join)	r<rlrm�padrnro�paddingZwords�chunksr!rkr"�	_85encodes
�rv)ro�wrapcolrs�adobecs�tdur*dd�tdd�D�add�tD�at|tt|d|��|rHt���r�t|rVdnd�����fd	d�td
t����D�}|r�t|d�d�kr�|�d�d
�|��|r��t	7��S)NcSsg|]}t|f��qSr!r4r5r!r!r"r8Dr9za85encode.<locals>.<listcomp>�!�vcSsg|]}tD]}||�qqSr!)�	_a85charsr:r!r!r"r8Er9TrErDcsg|]}�||���qSr!r!r5��resultrwr!r"r8Ms�rrKr9�
)
�
_a85chars2rRr{rv�	_A85START�maxrN�appendrr�_A85END)r<rorwrsrxrur!r|r"r/s$�

rs 	

)rorx�ignorecharsc	Cs�t|�}|rH|�t�s$td�t���|�t�r<|dd�}n|dd�}t�d�j	}g}|j
}g}|j
}|j}	|dD]�}
d|
kr�dkr�nnj||
�t|�dkr�d	}|D]}
d
||
d}q�z|||��Wntj
y�td�d�Yn0|	�qv|
dk�r|�rtd
��|d�qv|�rF|
dk�rF|�r<td��|d�qv|
|v�rTqvqvtd|
��qvd�|�}dt|�}
|
�r�|d|
�}|S)Nz1Ascii85 encoded byte sequences must end with {!r}rE����!Isuuuury�ur>rrjzAscii85 overflow�zzz inside Ascii85 5-tuples�yzy inside Ascii85 5-tuples    zNon-Ascii85 digit found: %cr9rI)r#�endswithr�r�format�
startswithr�rprq�packr��clearrN�errorrr)r<rorxr��packIreZdecoded_appendZcurrZcurr_appendZ
curr_clear�xrfr}rtr!r!r"rXsZ
��





rsU0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!#$%&()*+-;<=>?@^_`{|}~cCs2tdur$dd�tD�add�tD�at|tt|�S)NcSsg|]}t|f��qSr!r4r5r!r!r"r8�r9zb85encode.<locals>.<listcomp>cSsg|]}tD]}||�qqSr!)�	_b85charsr:r!r!r"r8�r9)�
_b85chars2�_b85alphabetr�rv)r<rsr!r!r"r�s	rc
	CsFtdur,dgdatt�D]\}}|t|<qt|�}t|�d}|d|}g}t�d�j}tdt|�d�D]�}|||d�}d}z|D]}|dt|}q�WnDt	y�t|�D]&\}}t|dur�t
d||�d�q��Yn0z|�||��Wqntj�y t
d|�d�Yqn0qnd	�
|�}	|�rB|	d|�}	|	S)
N�r>�~r�rrjz#bad base85 character at position %dz+base85 overflow in hunk starting at byte %dr9)�_b85decr^r�r#rNrprqr�rRrrr�r�rr)
r<r7rTrt�outr��chunkrf�jr}r!r!r"r
�sH

����

r
�LrIrGcCsX|�t�}|sqTt|�tkr>|�tt|��}|s4q>||7}qt�|�}|�|�qdSr1)�read�
MAXBINSIZErNr&r'�write)�input�outputr �ns�liner!r!r"r�s


rcCs(|��}|sq$t�|�}|�|�qdSr1)�readliner&r0r�)r�r�r�r r!r!r"r�s

rc
Cs�zt|�}Wn:tyF}z"d|jj}t|�|�WYd}~n
d}~00|jdvrld|j|jjf}t|��|jdkr�d|j|jjf}t|��dS)Nz"expected bytes-like object, not %s)rTr<�Bz-expected single byte elements, not %r from %srDz(expected 1-D data, not %d-D data from %s)rrrrr��ndim)r �m�err�msgr!r!r"�_input_type_check�s 
�
�r�cCsLt|�g}tdt|�t�D]$}|||t�}|�t�|��qd�|�S)Nrr9)r�rRrNr�r�r&r'rr)r �piecesr7r�r!r!r"rsrcCst|�t�|�Sr1)r�r&r0rr!r!r"rsrc	
Cs6ddl}ddl}z|�|jdd�d�\}}WnR|jy�}z8|j|_t|�td|jd�|�d�WYd}~n
d}~00t}|D]@\}}|dkr�t}|dkr�t	}|dkr�t	}|d	kr�t
�dSq�|�r |dd
k�r t|dd��}|||jj�Wd�n1�s0Yn||j
j|jj�dS)NrrDZdeutz�usage: %s [-d|-e|-u|-t] [file|-]
        -d, -u: decode
        -e: encode (default)
        -t: encode and decode string 'Aladdin:open sesame'rEz-ez-dz-uz-t�-�rb)�sys�getopt�argvr��stderr�stdout�print�exitrr�test�open�buffer�stdin)	r�r�Zopts�argsr��func�or;�fr!r!r"�mains(� 0r�cCs<d}tt|��t|�}tt|��t|�}tt|��dS)NsAladdin:open sesame)r��reprrr)Zs0�s1�s2r!r!r"r�8sr��__main__)N)NF)FN)F)FFF)F)/r-rpr&�__all__r)rOrr#rrrrr*r2r3rrrMrLr]rr	r
rr{rr�r�rvrrr�r�r�r�rr
ZMAXLINESIZEr�rrr�rrr�r�rr!r!r!r"�<module>	sX

	&
C

)H
-