https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/rsa/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/rsa/__pycache__/randnum.cpython-310.pyc
o

j��`a
�@spdZddlZddlZddlmZmZdedefdd�Zdedefdd	�Z	dedefd
d�Z
dedefd
d�ZdS)z(Functions for generating random numbers.�N)�common�	transform�nbits�returncCsNt|d�\}}t�|�}|dkr%tt�d��}|d|L}t�d|�|}|S)z�Reads 'nbits' random bits.

    If nbits isn't a whole number of bytes, an extra byte will be appended with
    only the lower bits set.
    �r��B)�divmod�os�urandom�ord�struct�pack)r�nbytes�rbits�
randomdata�randomvalue�r�-/usr/lib/python3/dist-packages/rsa/randnum.py�read_random_bitss
rcCs&t|�}t�|�}|d|d>O}|S)z3Reads a random integer of approximately nbits bits.r)rr�	bytes2int)rr�valuerrr�read_random_int.s
rcCst|�}|dBS)zhReads a random odd integer of approximately nbits bits.

    >>> read_random_odd_int(512) & 1
    1
    r)r)rrrrr�read_random_odd_int;sr�maxvaluecCsHt�|�}d}	t|�}||kr	|S|ddkr|r|d8}|d7}q)z�Returns a random integer x with 1 <= x <= maxvalue

    May take a very long time in specific situations. If maxvalue needs N bits
    to store, the closer maxvalue is to (2 ** N) - 1, the faster this function
    is.
    rT�
r)r�bit_sizer)rr�triesrrrr�randintHs
	��r)�__doc__r
r
�rsarr�int�bytesrrrrrrrr�<module>s


https://t.me/RX1948 - 2025