AlkantarClanX12

Your IP : 3.144.93.34


Current Path : /lib64/python3.8/__pycache__/
Upload File :
Current File : //lib64/python3.8/__pycache__/base64.cpython-38.opt-2.pyc

U

e5d�O�@s�ddlZddlZddlZdddddddd	d
ddd
ddddddgZeefZdd�ZdBdd�ZdCdd�Z	dd�Z
dd�Ze�dd�Z
e�dd�Zdd�Zdd�ZdZdadad d�ZdDd!d	�Zd"d
�ZdEd#d�Zdadad$Zd%ZdFd&d'�Zddddd(�d)d�Zddd*d+�d,d�Zd-Zda da!da"dGd.d�Z#d/d
�Z$d0Z%e%d1d2Z&d3d�Z'd4d�Z(d5d6�Z)d7d�Z*d8d9�Z+d:d�Z,d;d<�Z-d=d>�Z.d?d@�Z/e0dAk�r�e.�dS)H�N�encode�decode�encodebytes�decodebytes�	b64encode�	b64decode�	b32encode�	b32decode�	b16encode�	b16decode�	b85encode�	b85decode�	a85encode�	a85decode�standard_b64encode�standard_b64decode�urlsafe_b64encode�urlsafe_b64decodecCs|t|t�r4z|�d�WStk
r2td��YnXt|t�rB|Szt|���WStk
rvtd|j	j
�d�YnXdS)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!�/usr/lib64/python3.8/base64.py�_bytes_from_decode_data"s

��r#cCs,tj|dd�}|dk	r(|�t�d|��S|S)NF)�newline�+/)�binascii�
b2a_base64�	translate�bytes�	maketrans)r �altchars�encodedr!r!r"r3sFcCsNt|�}|dk	r*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
cCst|�S�N)rrr!r!r"rZscCst|�Sr1)rrr!r!r"rasr%s-_cCst|��t�Sr1)rr(�_urlsafe_encode_translationrr!r!r"roscCst|�}|�t�}t|�Sr1)r#r(�_urlsafe_decode_translationrrr!r!r"rxs
s ABCDEFGHIJKLMNOPQRSTUVWXYZ234567cs>tdkr,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>�szb32encode.<locals>.<listcomp>csg|]}�D]}||�qqSr!r!�r6�a�b�Zb32tabr!r"r8�s��r�big��i��
�s======i�����s====����s===�����=���)�_b32tab2�_b32alphabetrrrr�len�	bytearray�int�
from_bytes�ranger))r �leftoverr,rPZb32tab2r7�cr!r<r"r�s<
��
�


c
	Csztdkrdd�tt�D�at|�}t|�dr8t�d��|dk	r^t|�}|�t�	dd|��}|rj|�
�}t|�}|�d�}|t|�}t�}t}t
dt|�d�D]h}|||d�}d}	z|D]}
|	d	>||
}	q�Wn tk
r�t�d
�d�YnX||	�d	d�7}q�|d�s |dk�r*t�d��|�rr|�rr|	d	|K}	|	�d	d�}d
d	|d}|d|�|dd�<t|�S)NcSsi|]\}}||�qSr!r!)r6�k�vr!r!r"�
<dictcomp>�szb32decode.<locals>.<dictcomp>�zIncorrect paddings01�OrIrr=zNon-base32 digit foundr?>rrCrFrH��+���)�_b32rev�	enumeraterLr#rMr&r/r(r)r*�upper�rstriprNrQ�KeyError�to_bytes)
r �casefoldZmap01�lZpadchars�decodedZb32revr7Zquanta�accrSZlastrRr!r!r"r	�s@


cCst�|���Sr1)r&Zhexlifyr^rr!r!r"r
�scCs4t|�}|r|��}t�d|�r*t�d��t�|�S)Ns	[^0-9A-F]zNon-base16 digit found)r#r^r-�searchr&r/Z	unhexlify)r rbr!r!r"r�s

s<~s~>c	s�t|t�st|���}t|�d}|r4|d|}t�dt|�d��|�}����fdd�|D�}|r�|s�|ddkr��dd	|d<|dd|�|d<d
�|�S)NrHr>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>rJrgrr=�)	rrrrrM�struct�StructZunpack�join)	r;rkrl�padrmrn�paddingZwords�chunksr!rjr"�	_85encodes
�rv)rn�wrapcolrs�adobecs�tdkr*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"r8Dsza85encode.<locals>.<listcomp>�!�vcSsg|]}tD]}||�qqSr!)�	_a85charsr9r!r!r"r8EsTrDrCcsg|]}�||���qSr!r!r5��resultrwr!r"r8Ms�rrJro�
)
�
_a85chars2rQr{rv�	_A85START�maxrM�appendrr�_A85END)r;rnrwrsrxrur!r|r"r/s$�

s 	

)rnrx�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�nnl||
�t|�dkr�d	}|D]}
d
||
d}q�z|||��Wn tj
k
r�td�d�YnX|	�qv|
dk�r |�rtd
��|d�qv|�rH|
dk�rH|�r>td��|d�qv|
|k�rVqvqvtd|
��qvd�|�}dt|�}
|
�r�|d|
�}|S)Nz1Ascii85 encoded byte sequences must end with {!r}rD����!Isuuuury�ur=rrizAscii85 overflow�zzz inside Ascii85 5-tuples�yzy inside Ascii85 5-tuples    zNon-Ascii85 digit found: %crorH)r#�endswithr�r�format�
startswithr�rprq�packr��clearrM�errorrr)r;rnrxr��packIrdZdecoded_appendZcurrZcurr_appendZ
curr_clear�xrer}rtr!r!r"rXsZ
��





sU0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!#$%&()*+-;<=>?@^_`{|}~cCs2tdkr$dd�tD�add�tD�at|tt|�S)NcSsg|]}t|f��qSr!r4r5r!r!r"r8�szb85encode.<locals>.<listcomp>cSsg|]}tD]}||�qqSr!)�	_b85charsr9r!r!r"r8�s)�
_b85chars2�_b85alphabetr�rv)r;rsr!r!r"r�s	c
	CsJtdkr,dgdatt�D]\}}|t|<qt|�}t|�d}|d|}g}t�d�j}tdt|�d�D]�}|||d�}d}z|D]}|dt|}q�WnFt	k
r�t|�D]&\}}t|dkr�t
d||�d�q��YnXz|�||��Wqntjk
�r$t
d|�d�YqnXqnd	�
|�}	|�rF|	d|�}	|	S)
N�r=�~r�rriz#bad base85 character at position %dz+base85 overflow in hunk starting at byte %dro)�_b85decr]r�r#rMrprqr�rQrrr�r�rr)
r;r7rSrt�outr��chunkre�jr}r!r!r"r
�sH

����

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

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

c
Cs�zt|�}Wn8tk
rD}zd|jj}t|�|�W5d}~XYnX|jdkrjd|j|jjf}t|��|jdkr�d|j|jjf}t|��dS)Nz"expected bytes-like object, not %s)rSr;�Bz-expected single byte elements, not %r from %srCz(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)Nrro)r�rQrMr�r�r&r'rr)r �piecesr7r�r!r!r"rscCsddl}|�dtd�t|�S)NrzAencodestring() is a deprecated alias since 3.1, use encodebytes()rD)�warnings�warn�DeprecationWarningr�r r�r!r!r"�encodestrings�r�cCst|�t�|�Sr1)r�r&r0rr!r!r"rscCsddl}|�dtd�t|�S)NrzHdecodestring() is a deprecated alias since Python 3.1, use decodebytes()rD)r�r�r�rr�r!r!r"�decodestring$s�r�c	
Csddl}ddl}z|�|jdd�d�\}}WnP|jk
r~}z0|j|_t|�td|jd�|�d�W5d}~XYnXt}|D]@\}}|dkr�t}|dkr�t	}|dkr�t	}|d	kr�t
�dSq�|�r|dd
k�rt|dd��}|||jj�W5QRXn||j
j|jj�dS)NrrCZdeutz�usage: %s [-d|-e|-u|-t] [file|-]
        -d, -u: decode
        -e: encode (default)
        -t: encode and decode string 'Aladdin:open sesame'rDz-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"�main.s2�r�cCs<d}tt|��t|�}tt|��t|�}tt|��dS)NsAladdin:open sesame)r��reprrr)Zs0�s1�s2r!r!r"r�Hsr��__main__)N)NF)FN)F)FFF)F)1r-rpr&�__all__r)rNrr#rrrrr*r2r3rrrLrKr\rr	r
rr{rr�r�rvrrr�r�r�r�rr
ZMAXLINESIZEr�rrr�rr�rr�r�r�rr!r!r!r"�<module>	s��

	&
C

)H
-