%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/lib/python2.7/
Upload File :
Create Path :
Current File : //usr/local/lib/python2.7/base64.pyo

ó
Męáac@sÝdZddlZddlZddlZddlZddddddd	d
ddd
dddgZgedƒD]Zeeƒ^qsZ	dZ
d„Zdd„Z
dd„Zd„Zd„ZejddƒZejddƒZd„Zd„Zi dd6dd6d d!6d"d#6d$d%6d&d'6d(d)6d*d+6d,d-6d.d/6d0d16d2d36d4d56d6d76d8d96d:d;6d<d=6d>d?6d@dA6dBdC6dDdE6dFdG6dHdI6dJdK6dLdM6dNdO6dPdQ6dRdS6dTdU6dVdW6dXdY6dZd[6ZejƒZejƒgeD]\ZZe^qýZegejƒD]\ZZeeeƒf^q%ƒZd\„Ze dd]„Z!d^„Z"e d_„Z#d`Z$e$d=d5Z%da„Z&db„Z'dc„Z(dd„Z)de„Z*df„Z+e,dgkrŮe*ƒndS(hs/RFC 3548: Base16, Base32, Base64 Data Encodingsi˙˙˙˙Ntencodetdecodetencodestringtdecodestringt	b64encodet	b64decodet	b32encodet	b32decodet	b16encodet	b16decodetstandard_b64encodetstandard_b64decodeturlsafe_b64encodeturlsafe_b64decodeitcCsJt}x*|jƒD]\}}||t|ƒ<qW|jdj|ƒƒS(NR(t_translationtitemstordt	translatetjoin(tstaltcharsttranslationtktv((s"/usr/local/lib/python2.7/base64.pyt
_translate!scCs@tj|ƒd }|dk	r<|jtjd|d ƒƒS|S(slEncode a string using Base64.

    s is the string to encode.  Optional altchars must be a string of at least
    length 2 (additional characters are ignored) which specifies an
    alternative alphabet for the '+' and '/' characters.  This allows an
    application to e.g. generate url or filesystem safe Base64 strings.

    The encoded string is returned.
    i˙˙˙˙s+/iN(tbinasciit
b2a_base64tNoneRtstringt	maketrans(RRtencoded((s"/usr/local/lib/python2.7/base64.pyR+scCsh|dk	r.|jtj|d dƒƒ}nytj|ƒSWn"tjk
rc}t|ƒ‚nXdS(sĺDecode a Base64 encoded string.

    s is the string to decode.  Optional altchars must be a string of at least
    length 2 (additional characters are ignored) which specifies the
    alternative alphabet used instead of the '+' and '/' characters.

    The decoded string is returned.  A TypeError is raised if s is
    incorrectly padded.  Characters that are neither in the normal base-64
    alphabet nor the alternative alphabet are discarded prior to the padding
    check.
    is+/N(RRRRRt
a2b_base64tErrort	TypeError(RRtmsg((s"/usr/local/lib/python2.7/base64.pyR<s"cCs
t|ƒS(syEncode a string using the standard Base64 alphabet.

    s is the string to encode.  The encoded string is returned.
    (R(R((s"/usr/local/lib/python2.7/base64.pyR
QscCs
t|ƒS(s-Decode a string encoded with the standard Base64 alphabet.

    Argument s is the string to decode.  The decoded string is returned.  A
    TypeError is raised if the string is incorrectly padded.  Characters that
    are not in the standard alphabet are discarded prior to the padding
    check.
    (R(R((s"/usr/local/lib/python2.7/base64.pyRXss+/s-_cCst|ƒjtƒS(sÔEncode a string using the URL- and filesystem-safe Base64 alphabet.

    Argument s is the string to encode.  The encoded string is returned.  The
    alphabet uses '-' instead of '+' and '_' instead of '/'.
    (RRt_urlsafe_encode_translation(R((s"/usr/local/lib/python2.7/base64.pyRescCst|jtƒƒS(sŚDecode a string using the URL- and filesystem-safe Base64 alphabet.

    Argument s is the string to decode.  The decoded string is returned.  A
    TypeError is raised if the string is incorrectly padded.  Characters that
    are not in the URL-safe base-64 alphabet, and are not a plus '+' or slash
    '/', are discarded prior to the padding check.

    The alphabet uses '-' instead of '+' and '_' instead of '/'.
    (RRt_urlsafe_decode_translation(R((s"/usr/local/lib/python2.7/base64.pyR
ms
tAitJi	tSit3itBitKi
tTit4itCitLitUit5itDitMitVit6itEitNi
tWit7itFitOitXitGitPitYitHitQitZitIitRit2ic	Cs—g}tt|ƒdƒ\}}|rF|dd|7}|d7}nxŰt|ƒD]Í}tjd||d|dd!ƒ\}}}||d@d>7}||d@d>7}|jt|d?t|d	?d
@t|d?d
@t|d?t|d?d
@t|d
?d
@t|d?t|d
@gƒqSWtj|ƒ}|dkrK|d dS|d
krc|d dS|dkr{|d dS|dkr“|d dS|S(scEncode a string using Base32.

    s is the string to encode.  The encoded string is returned.
    isis!HHBiiiiiiiiiiú˙˙˙s======iü˙˙˙s====iý˙˙˙s===ii˙˙˙˙t=(	tdivmodtlentrangetstructtunpacktextendt_b32tabtEMPTYSTRINGR(	Rtpartstquantatleftovertitc1tc2tc3R((s"/usr/local/lib/python2.7/base64.pyRŽs6
.c
Cs
tt|ƒdƒ\}}|r0tdƒ‚n|rX|jtjdd|ƒƒ}n|rm|jƒ}nd}tjd|ƒ}|r˝t|j	dƒƒ}|dkr˝|| }q˝ng}d}d}	x‰|D]}
t
j|
ƒ}|dkrtd	ƒ‚n|t
|
|	>7}|	d
8}	|	dkrÖ|j
tjd|ƒƒd}d}	qÖqÖWtjd|ƒ}|dkrƒd}np|d
krœ|d }nW|dkrľ|d }n>|dkrÎ|d }n%|dkrç|d }ntdƒ‚|j
|ƒtj|ƒS(sGDecode a Base32 encoded string.

    s is the string to decode.  Optional casefold is a flag specifying whether
    a lowercase alphabet is acceptable as input.  For security purposes, the
    default is False.

    RFC 3548 allows for optional mapping of the digit 0 (zero) to the letter O
    (oh), and for optional mapping of the digit 1 (one) to either the letter I
    (eye) or letter L (el).  The optional argument map01 when not None,
    specifies which letter the digit 1 should be mapped to (when map01 is not
    None, the digit 0 is always mapped to the letter O).  For security
    purposes the default is None, so that 0 and 1 are not allowed in the
    input.

    The decoded string is returned.  A TypeError is raised if s were
    incorrectly padded or if there are non-alphabet characters present in the
    string.
    isIncorrect paddingt01R;is(?P<pad>[=]*)$tpadi#sNon-base32 digit foundis%010xRii˙˙˙˙iiţ˙˙˙iiý˙˙˙iiü˙˙˙N(RGRHR"RRRtuppertretsearchtgroupt_b32revtgetRtappendRt	unhexlifyRNR(
Rtcasefoldtmap01RPRQtpadcharstmoROtacctshifttctvaltlast((s"/usr/local/lib/python2.7/base64.pyR¸sP"


	




cCstj|ƒjƒS(scEncode a string using Base16.

    s is the string to encode.  The encoded string is returned.
    (RthexlifyRX(R((s"/usr/local/lib/python2.7/base64.pyRscCsC|r|jƒ}ntjd|ƒr6tdƒ‚ntj|ƒS(suDecode a Base16 encoded string.

    s is the string to decode.  Optional casefold is a flag specifying whether
    a lowercase alphabet is acceptable as input.  For security purposes, the
    default is False.

    The decoded string is returned.  A TypeError is raised if s is
    incorrectly padded or if there are non-alphabet characters present in the
    string.
    s	[^0-9A-F]sNon-base16 digit found(RXRYRZR"RR_(RR`((s"/usr/local/lib/python2.7/base64.pyR	
s
iLcCsŒx…tr‡|jtƒ}|s"PnxCt|ƒtkrg|jtt|ƒƒ}|sZPn||7}q%Wtj|ƒ}|j|ƒqWdS(sEncode a file.N(tTruetreadt
MAXBINSIZERHRRtwrite(tinputtoutputRtnstline((s"/usr/local/lib/python2.7/base64.pyR$s	cCsCx<tr>|jƒ}|sPntj|ƒ}|j|ƒqWdS(sDecode a file.N(RjtreadlineRR Rm(RnRoRqR((s"/usr/local/lib/python2.7/base64.pyR3s	cCs]g}xGtdt|ƒtƒD]-}|||t!}|jtj|ƒƒqWdj|ƒS(s4Encode a string into multiple lines of base-64 data.iR(RIRHRlR^RRR(RtpiecesRRtchunk((s"/usr/local/lib/python2.7/base64.pyR=s
cCs
tj|ƒS(sDecode a string.(RR (R((s"/usr/local/lib/python2.7/base64.pyRFsc	CsQddl}ddl}y#|j|jddƒ\}}WnD|jk
r}|j|_|GHd|jdGH|jdƒnXt}xj|D]b\}}|dkr°t}n|d	krĹt}n|d
krÚt}n|dkrt	ƒdSqW|r:|ddkr:t
|dd
ƒ}|||jƒWdQXn||j|jƒdS(sSmall test programi˙˙˙˙Nitdeutsusage: %s [-d|-e|-u|-t] [file|-]
        -d, -u: decode
        -e: encode (default)
        -t: encode and decode string 'Aladdin:open sesame'iis-es-ds-us-tt-trb(tsystgetopttargvterrortstderrtstdouttexitRRttest1topentstdin(	RxRytoptstargsR#tfunctotatf((s"/usr/local/lib/python2.7/base64.pyttestMs.#			cCs5d}t|ƒ}t|ƒ}|Gt|ƒG|GHdS(NsAladdin:open sesame(RRtrepr(ts0ts1ts2((s"/usr/local/lib/python2.7/base64.pyRgst__main__(-t__doc__RYRJRRt__all__RIt_xtchrRRNRRRRR
RRR$R%RR
t_b32alphabetRRMtsortRRtdicttlongR\RtFalseRRR	tMAXLINESIZERlRRRRRˆRt__name__(((s"/usr/local/lib/python2.7/base64.pyt<module>s`%	
		
		
7	*J			
					

Zerion Mini Shell 1.0