AlkantarClanX12

Your IP : 3.145.161.194


Current Path : /opt/alt/python37/lib64/python3.7/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib64/python3.7/__pycache__/base64.cpython-37.opt-2.pyc

B

YI~d�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_b64decodecCsxt|t�r2y
|�d�Stk
r0td��YnXt|t�r@|Syt|���Stk
rrtd|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 �+/opt/alt/python37/lib64/python3.7/base64.py�_bytes_from_decode_data"s


r"cCs,tj|dd�}|dk	r(|�t�d|��S|S)NF)�newlines+/)�binascii�
b2a_base64�	translate�bytes�	maketrans)r�altchars�encodedr r r!r3sFcCsNt|�}|dk	r*t|�}|�t�|d��}|rDt�d|�sDt�d��t�|�S)Ns+/s[A-Za-z0-9+/]*={0,2}zNon-base64 digit found)	r"r&r'r(�re�	fullmatchr$�Error�
a2b_base64)rr)Zvalidater r r!rAs
cCst|�S)N)r)rr r r!rZscCst|�S)N)r)rr r r!rass+/s-_cCst|��t�S)N)rr&�_urlsafe_encode_translation)rr r r!roscCst|�}|�t�}t|�S)N)r"r&�_urlsafe_decode_translationr)rr r r!rxs
s ABCDEFGHIJKLMNOPQRSTUVWXYZ234567csBtdkr,dd�tD���fdd��D�ad�t|t�sBt|���}t|�d}|rb|dd|}t�}tj	}t}xjt
dt|�d�D]V}||||d�d�}|||d?||d	?d
@||d?d
@||d
@7}q�W|dkr�d
|dd�<nF|dk�rd|dd�<n.|dk�r$d|dd�<n|dk�r:d|dd�<t|�S)NcSsg|]}t|f��qSr )r')�.0�ir r r!�
<listcomp>�szb32encode.<locals>.<listcomp>csg|]}�D]}||�qqSr r )r1�a�b)�b32tabr r!r3�s��r�big��i��
�s======i�����s====����s===�����=���)�_b32tab2�_b32alphabetrrrr�len�	bytearray�int�
from_bytes�ranger')r�leftoverr*rJZb32tab2r2�cr )r6r!r�s4
*


c
	Cs�tdkrdd�tt�D�at|�}t|�dr8t�d��|dk	r^t|�}|�t�	dd|��}|rj|�
�}t|�}|�d�}|t|�}t�}t}x�t
dt|�d�D]l}|||d�}d}	y"x|D]}
|	d	>||
}	q�WWn tk
r�t�d
�d�YnX||	�d	d�7}q�W|d�s(|dk�r2t�d��|�rz|�rz|	d	|K}	|	�d	d�}d
d	|d}|d|�|dd�<t|�S)NcSsi|]\}}||�qSr r )r1�k�vr r r!�
<dictcomp>�szb32decode.<locals>.<dictcomp>�zIncorrect paddings01�OrCrr7zNon-base32 digit foundr9>rr=r@rB��+���)�_b32rev�	enumeraterFr"rGr$r-r&r'r(�upper�rstriprHrK�KeyError�to_bytes)
r�casefoldZmap01�lZpadchars�decodedZb32revr2Zquanta�accrMZlastrLr r r!r	�s@



cCst�|���S)N)r$ZhexlifyrX)rr r r!r
�scCs4t|�}|r|��}t�d|�r*t�d��t�|�S)Ns	[^0-9A-F]zNon-base16 digit found)r"rXr+�searchr$r-Z	unhexlify)rr\r 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)NrBr8z!%dIcsPg|]H}�r|sdn6�r$|dkr$dn&�|d�|dd�|d�qS)�zi    �yi�^	�Ui9r )r1Zword)�chars�chars2�foldnuls�
foldspacesr r!r3!sz_85encode.<locals>.<listcomp>rDrarr7�)	rrrrrG�struct�Struct�unpack�join)	r5rdre�padrfrg�paddingZwords�chunksr )rdrerfrgr!�	_85encodes
rp)rg�wrapcolrm�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 )r')r1r2r r r!r3Dsza85encode.<locals>.<listcomp>�!�vcSsg|]}tD]}||�qqSr )�	_a85chars)r1r4r5r r r!r3EsTr>r=csg|]}�||���qSr r )r1r2)�resultrqr r!r3MsrrDrh�
)
rurK�
_a85chars2rp�	_A85START�maxrG�appendrl�_A85END)r5rgrqrmrrror )rvrqr!r/s"

s 	

)rgrr�ignorecharsc	Cs�t|�}|rH|�t�s$td�t���|�t�r<|dd�}n|dd�}t�d�j	}g}|j
}g}|j
}|j}	�x|dD]�}
d|
kr�dk�rnnt||
�t|�dk�rpd	}x|D]}
d
||
d}q�Wy|||��Wn"tj
k
�rtd�d�YnX|	�qz|
dk�r.|�r$td
��|d�qz|�rV|
dk�rV|�rLtd��|d�qz|
|k�rdqzqztd|
��qzWd�|�}dt|�}
|
�r�|d|
�}|S)Nz1Ascii85 encoded byte sequences must end with {!r}r>���z!Isuuuurs�ur7rrczAscii85 overflow�zzz inside Ascii85 5-tuples�yzy inside Ascii85 5-tuples    zNon-Ascii85 digit found: %crhrB)r"�endswithr|r�format�
startswithryrirj�packr{�clearrG�errorrl)r5rgrrr}�packIr^Zdecoded_appendZcurrZcurr_appendZ
curr_clear�xr_rvrnr r r!rXsV







sU0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!#$%&()*+-;<=>?@^_`{|}~cCs2tdkr$dd�tD�add�tD�at|tt|�S)NcSsg|]}t|f��qSr )r')r1r2r r r!r3�szb85encode.<locals>.<listcomp>cSsg|]}tD]}||�qqSr )�	_b85chars)r1r4r5r r r!r3�s)r��_b85alphabet�
_b85chars2rp)r5rmr r r!r�s	c
	CsZtdkr0dgdaxtt�D]\}}|t|<qWt|�}t|�d}|d|}g}t�d�j}x�tdt|�d�D]�}|||d�}d}y"x|D]}|dt|}q�WWnJt	k
r�x2t|�D]&\}}t|dkr�t
d||�d�q�W�YnXy|�||��Wqttjk
�r2t
d|�d�YqtXqtWd	�
|�}	|�rV|	d|�}	|	S)
N�r7�~z!Irrcz#bad base85 character at position %dz+base85 overflow in hunk starting at byte %drh)�_b85decrWr�r"rGrirjr�rKrrr{r�rl)
r5r2rMrn�outr��chunkr_�jrvr r r!r
�s<


�LrBr@cCs`xZ|�t�}|sPx0t|�tkrB|�tt|��}|s8P||7}qWt�|�}|�|�qWdS)N)�read�
MAXBINSIZErGr$r%�write)�input�outputr�ns�liner r r!r�s

cCs,x&|��}|sPt�|�}|�|�qWdS)N)�readliner$r.r�)r�r�r�rr r r!r�s
c
Cs�yt|�}Wn8tk
rD}zd|jj}t|�|�Wdd}~XYnX|jdkrjd|j|jjf}t|��|jdkr�d|j|jjf}t|��dS)Nz"expected bytes-like object, not %s)rMr5�Bz-expected single byte elements, not %r from %sr=z(expected 1-D data, not %d-D data from %s)rrrrr��ndim)r�m�err�msgr r r!�_input_type_check�s

r�cCsPt|�g}x8tdt|�t�D]$}|||t�}|�t�|��qWd�|�S)Nrrh)r�rKrGr�r{r$r%rl)r�piecesr2r�r r r!rscCsddl}|�dtd�t|�S)NrzAencodestring() is a deprecated alias since 3.1, use encodebytes()r>)�warnings�warn�DeprecationWarningr)rr�r r r!�encodestringsr�cCst|�t�|�S)N)r�r$r.)rr r r!rscCsddl}|�dtd�t|�S)NrzHdecodestring() is a deprecated alias since Python 3.1, use decodebytes()r>)r�r�r�r)rr�r r r!�decodestring$sr�c	
Cs ddl}ddl}y|�|jdd�d�\}}WnP|jk
r~}z0|j|_t|�td|jd�|�d�Wdd}~XYnXt}xF|D]>\}}|dkr�t}|dkr�t	}|dkr�t	}|d	kr�t
�dSq�W|�r
|dd
k�r
t|dd��}|||jj�WdQRXn||j
j|jj�dS)Nrr=Zdeutz�usage: %s [-d|-e|-u|-t] [file|-]
        -d, -u: decode
        -e: encode (default)
        -t: encode and decode string 'Aladdin:open sesame'r>z-ez-dz-uz-t�-�rb)�sys�getopt�argvr��stderr�stdout�print�exitrr�test�open�buffer�stdin)	r�r�Zopts�argsr��func�or4�fr r r!�main.s0r�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+rir$�__all__r'rHrr"rrrrr(r/r0rrrFrErVrr	r
rrurxryr|rprrr�r�r�r�rr
ZMAXLINESIZEr�rrr�rr�rr�r�r�rr r r r!�<module>	sf

	&
C

)H
-