ok

Mini Shell

Direktori : /opt/imunify360/venv/lib/python3.11/site-packages/Crypto/Random/__pycache__/
Upload File :
Current File : //opt/imunify360/venv/lib/python3.11/site-packages/Crypto/Random/__pycache__/random.cpython-311.pyc

�

f��fr����gd�ZddlmZddlmZGd�de��Ze��ZejZej	Z	ej
Z
ejZejZej
Z
ddlmZmZmZmZdS))�StrongRandom�getrandbits�	randrange�randint�choice�shuffle�sample�)�Random)�
is_native_intc�:�eZdZd	d�Zd�Zd�Zd�Zd�Zd�Zd�Z	dS)
rNc�x�|�|�	d|_dS|�|�	||_dS|�|�|j|_dStd���)Nz(Cannot specify both 'rng' and 'randfunc')�	_randfunc�read�
ValueError)�self�rng�randfuncs   �v/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib64/python3.11/site-packages/Crypto/Random/random.py�__init__zStrongRandom.__init__ sR������!�D�N�N�N�
�
!�c�k�%�D�N�N�N�
�
�#�/� �X�D�N�N�N��G�H�H�H�c	��|j�tj��j|_d|zdz
}|t	|�t|d������zS)z%Return an integer with k random bits.N��)rr
�newr�
bytes_to_long�ceil_div)r�k�masks   rrzStrongRandom.getrandbits*sP���>�!�#�Z�\�\�.�D�N��Q��!�|���m�D�N�N�8�A�q�>�>�$B�$B�C�C�C�Crc	�j�t|��dkr|\}}}nWt|��dkr|\}}d}n<t|��dkr	|\}d}d}n tdt|��fz���t|��rt|��rt|��std���|dkrtd���t	||z
|��}|dkrd}|dkrtd|�d	|�d	|�d
����|}||kr(|�t
|����}||k�(|||zzS)zkrandrange([start,] stop[, step]):
        Return a randomly-selected element from range(start, stop, step).��rr	z.randrange expected at most 3 arguments, got %dz$randrange requires integer argumentsz(randrange step argument must not be zerozempty range for randrange(z, �))�len�	TypeErrorrrrr�size)r�args�start�stop�step�num_choices�rs       rrzStrongRandom.randrange2sv���t�9�9��>�>�"&��U�D�$�$�
��Y�Y�!�^�^� �M�U�D��D�D�
��Y�Y�!�^�^��G�T��E��D�D��L�PS�TX�PY�PY�|�[�\�\�\��e�$�$�	D�M�$�,?�,?�	D��d�#�#�	D��B�C�C�C��1�9�9��G�H�H�H��t�e�|�T�2�2����?�?��K���?�?��*����t�t�t�UY�UY�UY�Z�[�[�[�
���;���� � ��k�!2�!2�3�3�A��;�����q��!�!rc��t|��rt|��std���|�||dz��}||cxkr|ksnJ�|S)z0Return a random integer N such that a <= N <= b.z"randint requires integer argumentsr)rr$r)r�a�b�Ns    rrzStrongRandom.randintSsi���Q���	B�}�Q�'7�'7�	B��@�A�A�A��N�N�1�a��c�"�"���A�{�{�{�{��{�{�{�{�{�{��rc��t|��dkrtd���||�t|����S)zrReturn a random element from a (non-empty) sequence.

        If the seqence is empty, raises IndexError.
        r	zempty sequence)r#�
IndexErrorr)r�seqs  rrzStrongRandom.choice[s?��
�s�8�8�q�=�=��-�.�.�.��4�>�>�#�c�(�(�+�+�,�,rc��tt|��dz
dd��D]2}|�d|dz��}||||c||<||<�3dS)zShuffle the sequence in place.rr	���N)�ranger#r)r�x�i�js    rrzStrongRandom.shuffledsg���s�1�v�v�a�x��B�'�'�	$�	$�A����q�!�A�#�&�&�A��1��q��t�J�A�a�D�!�A�$�$�	$�	$rc��t|��}||krtd���g}i}t|��D]E}d}|�||vr|�|��}|�||v�|�||��d||<�F|S)zNReturn a k-length list of unique elements chosen from the population sequence.zsample larger than populationNr)r#rr5r�append)r�
populationrr*�retval�selectedr7r+s        rrzStrongRandom.samplens����*�o�o���{�?�?��<�=�=�=������q���	�	�A��A��)�q�H�}�}��N�N�;�/�/���)�q�H�}�}��M�M�*�Q�-�(�(�(��H�Q�K�K��
r)NN)
�__name__�
__module__�__qualname__rrrrrrr�rrrrs�������I�I�I�I�D�D�D�"�"�"�B���-�-�-�$�$�$�����rr)rr�
long_to_bytesr%N)�__all__�Cryptor
�Crypto.Util.py3compatr�objectr�_rrrrrrr�Crypto.Util.numberrrrBr%rArr�<module>rIs���2a�
`�
`��������/�/�/�/�/�/�^�^�^�^�^�6�^�^�^�@�\�^�^���n���L�	�
�*��	���
�*��	���L�K�K�K�K�K�K�K�K�K�K�K�K�Kr

Zerion Mini Shell 1.0