python (3.12.0)

(root)/
lib/
python3.12/
__pycache__/
base64.cpython-312.pyc

ˑe{P`dZddlZddlZddlZgdZeefZdZd5dZ	d6dZ
dZd	Zejd
dZejdd
ZdZd
ZdZdZdZdZdZiaiadZd7dZdZej9de_d7dZej9dee_dZej9de_d8dZej9dde_dZ d8dZ!da"da#d Z$d!Z%d9d"Z&ddddd#d$Z'ddd%d&d'Z(d(Z)da*da+da,d8d)Z-d*Z.d+Z/e/d,zd-zZ0d.Z1d/Z2d0Z3d1Z4d2Z5d3Z6e7d4k(re6yy):zDBase16, Base32, Base64 (RFC 3548), Base85 and Ascii85 data encodingsN)encodedecodeencodebytesdecodebytes	b64encode	b64decode	b32encode	b32decodeb32hexencodeb32hexdecode	b16encode	b16decode	b85encode	b85decode	a85encode	a85decodestandard_b64encodestandard_b64decodeurlsafe_b64encodeurlsafe_b64decodec.t|tr	|jdSt|t
r|S	t
|jS#t$rt	dwxYw#t$r$td|jjzdwxYw)Nasciiz4string argument should contain only ASCII charactersz>argument should be a bytes-like object or ASCII string, not %r)
isinstancestrrUnicodeEncodeError
ValueErrorbytes_types
memoryviewtobytes	TypeError	__class____name__ss :/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/base64.py_bytes_from_decode_datar&"s!S	U88G$$![!K!}$$&&"	USTT	UK)+,;;+?+?@AFJ	KKsAA'A$'-Bctj|d}|Ct|dk(sJt||j	t
j
d|S|S)a*Encode the bytes-like object s using Base64 and return a bytes object.

    Optional altchars should be a byte string of length 2 which specifies an
    alternative alphabet for the '+' and '/' characters.  This allows an
    application to e.g. generate url or filesystem safe Base64 strings.
    F)newline+/)binascii
b2a_base64lenrepr	translatebytes	maketrans)r$altcharsencodeds   r%rr3sU!!!U3G8}!14>1  !ABBNFct|}|Nt|}t|dk(sJt||jtj|d}t
j||S)aDecode the Base64 encoded bytes-like object or ASCII string s.

    Optional altchars must be a bytes-like object or ASCII string of length 2
    which specifies the alternative alphabet used instead of the '+' and '/'
    characters.

    The result is returned as a bytes object.  A binascii.Error is raised if
    s is incorrectly padded.

    If validate is False (the default), characters that are neither in the
    normal base-64 alphabet nor the alternative alphabet are discarded prior
    to the padding check.  If validate is True, these non-alphabet characters
    in the input result in a binascii.Error.
    For more information about the strict base64 check, see:

    https://docs.python.org/3.11/library/binascii.html#binascii.a2b_base64
    r)r*)strict_mode)r&r-r.r/r0r1r+
a2b_base64)r$r2validates   r%rrAsb$	 "A*848}!14>1
KK%89qh77r4ct|S)zrEncode bytes-like object s using the standard Base64 alphabet.

    The result is returned as a bytes object.
    )rr#s r%rr[s
Q<r4ct|S)aQDecode bytes encoded with the standard Base64 alphabet.

    Argument s is a bytes-like object or ASCII string to decode.  The result
    is returned as a bytes object.  A binascii.Error is raised if the input
    is incorrectly padded.  Characters that are not in the standard alphabet
    are discarded prior to the padding check.
    )rr#s r%rrbsQ<r4r*s-_c>t|jtS)zEncode bytes using the URL- and filesystem-safe Base64 alphabet.

    Argument s is a bytes-like object to encode.  The result is returned as a
    bytes object.  The alphabet uses '-' instead of '+' and '_' instead of
    '/'.
    )rr/_urlsafe_encode_translationr#s r%rrpsQ<!!"=>>r4cXt|}|jt}t|S)aDecode bytes using the URL- and filesystem-safe Base64 alphabet.

    Argument s is a bytes-like object or ASCII string to decode.  The result
    is returned as a bytes object.  A binascii.Error is raised if the input
    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 '/'.
    )r&r/_urlsafe_decode_translationrr#s r%rrys'	 "A	/0AQ<r4zK
Encode the bytes-like objects using {encoding} and return a bytes object.
a
Decode the {encoding} encoded bytes-like object or ASCII string s.

Optional casefold is a flag specifying whether a lowercase alphabet is
acceptable as input.  For security purposes, the default is False.
{extra_args}
The result is returned as a bytes object.  A binascii.Error is raised if
the input is incorrectly padded or if there are non-alphabet
characters present in the input.
a
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.
s ABCDEFGHIJKLMNOPQRSTUVWXYZ234567s 0123456789ABCDEFGHIJKLMNOPQRSTUVc|tvr>|Dcgc]}t|f}}|Dcgc]}|D]}||z	c}}t|<d}t|tst	|j}t
|dz}|r|dd|z
zz}t}tj}t|}	tdt
|dD]<}||||dz}
||	|
dz	|	|
dz	dzz|	|
dz	dzz|	|
dzzz
}>|dk(rd	|d
dt|S|dk(rd|d
dt|S|dk(rd|ddt|S|dk(rd|ddt|Scc}wcc}}w)Nri
s======ir)s====s====)_b32tab2r0rrrrr-	bytearrayint
from_bytesrange)alphabetr$ib32tabableftoverr3rOb32tab2cs           r%
_b32encoderYsx'/0!%+00-3DVDa!eDeDa%qM!!#1vzH
X&&kGJx G
1c!fa
 qAE{#GAG$Q"W-./Q"W-./AI&'	1} >

Q
>	
Q>
Q>;1Ds
EEc|tvr&t|Dcic]\}}||
c}}t|<t|}t|dzrt	j
d|Qt|}t|dk(sJt
||jtjdd|z}|r|j}t|}|jd}|t|z
}t}t|}	tdt|dD]4}
||
|
dz}d}	|D]
}
|dz|	|
z}	||jdz
}6|dzs|d
vrt	j
d|r.|r,d|zz}|jd}dd|zz
dz}|d||ddt|Scc}}w#t$rt	j
d	dwxYw)
NzIncorrect paddingrEs01OrJrr@zNon-base32 digit found>rrErGrI+)_b32rev	enumerater&r-r+Errorr.r/r0r1upperrstriprMrPKeyErrorto_bytes)rQr$casefoldmap01kvlpadcharsdecodedb32revrRquantaaccrXlastrVs                r%
_b32decoderrsw.7.ABdaQTB"A
1vznn011
'.5zQ+U+
KKte|<=
GGI	AA	A3q6zHkG
X
F
1c!fa
 #1a!e	E
-ax6!9,
-	3<<?"#	1u/nn011GH||AX%!+IX>OC8	E..!9:D	Es
F%#F++ Gc"tt|SN)rY_b32alphabetr#s r%r	r	slA&&r4base32)encodingc&tt|||Srt)rrru)r$rgrhs   r%r
r
slAx77r4)rw
extra_argsc"tt|Srt)rY_b32hexalphabetr#s r%rrsoq))r4	base32hexc$tt||Srt)rrr{r$rgs  r%rrsoq(33r4cHtj|jS)zKEncode the bytes-like object s using Base16 and return a bytes object.
    )r+hexlifyrcr#s r%r
r
sA$$&&r4ct|}|r|j}tjd|rt	j
dt	j|S)aDecode the Base16 encoded bytes-like object or ASCII string s.

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

    The result is returned as a bytes object.  A binascii.Error is raised if
    s is incorrectly padded or if there are non-alphabet characters present
    in the input.
    s	[^0-9A-F]zNon-base16 digit found)r&rcresearchr+rb	unhexlifyr~s  r%rrsK	 "A
GGI	yyq!nn566a  r4s<~s~>ct|tst|j}t	|dz}|r|d|zz}tjdt	|dzzj|}|Dcgc].}|r|sdn%|r|dk(rdn||dz||dzd	zz||dzz0}	}|r!|s|	d
dk(r|ddz|	d
<|	d
d||	d
<d
j|	Scc}w)NrIrAz!%dIzi    yi^	Ui9rKrr@r4)	rrrrr-structStructunpackjoin)
rUcharschars2padfoldnuls
foldspacespaddingwordswordchunkss
          r%	_85encoder0sa%qM!!#Aw!mG
MM&CFaK0188;E !
td TZ%7ddfn%dbj4'()TBY !!F!s":qAF2JBZ	'*r
88F!s:3C#)rwrapcolradobectHtddDcgc]}t|fc}atDcgc]}tD]}||z	c}}at	tt|d|}|r	t
|z}|rqt
|rdnd|}tdt||Dcgc]
}||||z}}|r%t|ddz|kDr|jdd	j|}|r	|tz
}|Scc}wcc}}wcc}w)
aEncode bytes-like object b using Ascii85 and return a bytes object.

    foldspaces is an optional flag that uses the special short sequence 'y'
    instead of 4 consecutive spaces (ASCII 0x20) as supported by 'btoa'. This
    feature is not supported by the "standard" Adobe encoding.

    wrapcol controls whether the output should have newline (b'\n') characters
    added to it. If this is non-zero, each output line will be at most this
    many characters long.

    pad controls whether the input is padded to a multiple of 4 before
    encoding. Note that the btoa implementation always pads.

    adobe controls whether the encoded byte sequence is framed with <~ and ~>,
    which is used by the Adobe implementation.
    !vTr)rErrKr4
)
_a85chars2rPr0	_a85charsr	_A85STARTmaxr-appendr_A85END)	rUrrrrrRrTresultrs	         r%rrHs(*/C.9QUA4[9	'0D!)DQq1uDuD

q)ZdJ
GFV#5aa1 CK9;AK(;;6":"W,

c"F#'M%:D;sC2C7C=s 	

)rrignorecharsc0t|}|rS|jtstdj	t|jtr|dd}n|dd}tjdj}g}|j}g}|j}|j}	|dzD]}
d|
cxkrdkrEnnB||
t|d	k(s(d
}|D]
}
d|z|
dz
z}	||||	S|
d
k(r|rtd|dn|r|
dk(r|rtd|d|
|vrtd|
zdj|}dt|z
}
|
r|d|
}|S#tj$r
tddwxYw)aDecode the Ascii85 encoded bytes-like object or ASCII string b.

    foldspaces is a flag that specifies whether the 'y' short sequence should be
    accepted as shorthand for 4 consecutive spaces (ASCII 0x20). This feature is
    not supported by the "standard" Adobe encoding.

    adobe controls whether the input sequence is in Adobe Ascii85 format (i.e.
    is framed with <~ and ~>).

    ignorechars should be a byte string containing characters to ignore from the
    input. This should only contain whitespace characters, and by default
    contains all whitespace characters in ASCII.

    The result is returned as a bytes object.
    z1Ascii85 encoded byte sequences must end with {!r}r)N!Isuuuurur@rrzAscii85 overflowzzz inside Ascii85 5-tuplesyzy inside Ascii85 5-tuples    zNon-Ascii85 digit found: %cr4rI)r&endswithrrformat
startswithrrrpackrclearr-errorr)rUrrrpackIrmdecoded_appendcurrcurr_append
curr_clearxrprrs              r%rrqs 	 "Azz'""F7O

<<	"!BA#2A

MM$$$EG^^N
D++KJ
\@a"7"N4yA~.As(a"f-C.C"5:.
'\ !;<<;'
AL !;<<./
+
:Q>??1@4XXg
F#d)mG	'"M-||C$%78dBCs*E55 FsU0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!#$%&()*+-;<=>?@^_`{|}~ctBtDcgc]}t|fc}atDcgc]}tD]}||z	c}}at	tt|Scc}wcc}}w)zEncode bytes-like object b in base85 format and return a bytes object.

    If pad is true, the input is padded with b'\0' so its length is a multiple of
    4 bytes before encoding.
    )
_b85chars2_b85alphabetr0	_b85charsr)rUrrRrTs    r%rrsY*67QUA4[7	'0D!)DQq1uDuD
Q	:s338Ds
AA$ct&dgdzattD]\}}|t|<t|}t	|dz}|d|zz}g}tjdj}tdt	|dD]<}|||dz}d}	|D]}|dzt|z}		|j||>d
j|}	|r|	d|}	|	S#t$r0t|D] \}}t|td||zzdwxYw#t
j$rtd	|zdwxYw)zqDecode the base85-encoded bytes-like object or ASCII string b

    The result is returned as a bytes object.
    Nr@~rrrz#bad base85 character at position %dz+base85 overflow in hunk starting at byte %dr4)_b85decrarr&r-rrrrPr rrrr)
rUrRrXroutrchunkrpjrs
          r%rrs&3,l+	DAqGAJ		 "AAw!mG	D7NA
CMM$$$E
1c!fa
 ,!AE
	
,Bh+
,	,JJuSz",$XXc]F	'"M	!%(
911:%$%J'(1u&./489
9
	||	,J !"'+
,	,sC ,D #DD#D?LrIrGc|jtx}rt|tkr^|jtt|z
x}r;||z
}t|tkr$|jtt|z
x}r;tj|}|j||jtx}ryy)z1Encode a file; input and output are binary files.N)read
MAXBINSIZEr-r+r,write)inputoutputr$nslines     r%rrszz*%
%!
%!fz!UZZ
3q68I-J'Jr'J
GA!fz!UZZ
3q68I-J'Jr'J""1%T	zz*%
%!
%r4c|jx}r:tj|}|j||jx}r9yy)z1Decode a file; input and output are binary files.N)readliner+r7r)rrrr$s    r%rrsC.."
"$
"%Q.."
"$
"r4c	t|}|jdvr1d|jd|jj}t||j
dk7r0d|j
|jjfz}t|y#t$r*}d|jjz}t||d}~wwxYw)Nz"expected bytes-like object, not %s)rXrUBz#expected single byte elements, not z from rEz(expected 1-D data, not %d-D data from %s)rr r!r"rndim)r$merrmsgs    r%_input_type_checkrs&qM	xx&+,88Q[[5I5IKnvv{9+,661;;3G3G*HIn&2Q[[5I5IIn#%&sB	B?%B::B?ct|g}tdt|tD]2}|||tz}|j	tj|4dj|S)zVEncode a bytestring into a bytes object containing multiple lines
    of base-64 data.rr4)rrPr-rrr+r,r)r$piecesrRrs    r%rrsea
F
1c!fj
)2!a*n%

h))%01288Fr4cBt|tj|S)z8Decode a bytestring of base-64 data into a bytes object.)rr+r7r#s r%rr'saq!!r4cddl}ddl}d|jdd}	|j|jddd\}}t}D]8\}}|dk(rt}|d	k(rt}|d
k(rt}|dk(s-t
|yr>|ddk7r6t|dd
5}	||	|j
jdddy||jj|j
jy#|j$rC}|j|_t
|t
||jdYd}~d}~wwxYw#1swYyxYw)zSmall main programrNzusage: zx [-h|-d|-e|-u] [file|-]
        -h: print this help message and exit
        -d, -u: decode
        -e: encode (default)rEhdeur)z-ez-dz-uz-h-rb)
sysgetoptargvrstderrstdoutprintexitrropenbufferstdin)
rrusageoptsargsrfuncorTfs
          r%mainr.s6}%
 E]]388AB<8
dD+19Vd9Vd9Vd9eElF	+
Q3
$q'4
 	'ACJJ%%&	'	'	
SYY

szz001<<ZZ

c

e		'	's#"C4E	4E8EE	E__main__rt)NF)FN)F)FFF)8__doc__rrr+__all__r0rMrr&rrrrr1r<r>rr_B32_ENCODE_DOCSTRING_B32_DECODE_DOCSTRING_B32_DECODE_MAP01_DOCSTRINGrur{rLr`rYrrr	rr
rrr
rrrrrrrrrrrrrrMAXLINESIZErrrrrrrr"r4r%<module>rsK

$i K"84$ooeU;#ooeU;?
$	35

"H,^')00(0C	8)00(3N1P	*,33[3I4-33[?A4C'!*
	

	
0 %aU%'R %E|DPE	


4'Z1na


 "26zFr4