ó
    úƒgä  ã                  ó`   • S r SSKJr  SSKrSSKJr  \R                  " S\SS9  S
S jr	SS	 jr
g)z*
PRNG management routines, thin wrappers.
é    )ÚannotationsN)Úlibz>OpenSSL.rand is deprecated - you should use os.urandom insteadé   )Ú
stacklevelc                óÆ   • [        U [        5      (       d  [        S5      e[        U[        5      (       d  [        S5      e[        R
                  " U [        U 5      U5        g)aÊ  
Mix bytes from *string* into the PRNG state.

The *entropy* argument is (the lower bound of) an estimate of how much
randomness is contained in *string*, measured in bytes.

For more information, see e.g. :rfc:`1750`.

This function is only relevant if you are forking Python processes and
need to reseed the CSPRNG after fork.

:param buffer: Buffer with random data.
:param entropy: The entropy (in bytes) measurement of the buffer.

:return: :obj:`None`
zbuffer must be a byte stringzentropy must be an integerN)Ú
isinstanceÚbytesÚ	TypeErrorÚintÚ_libÚRAND_addÚlen)ÚbufferÚentropys     Ú./usr/lib/python3/dist-packages/OpenSSL/rand.pyÚaddr      sJ   € ô" �fœe×$Ñ$ÜÐ6Ó7Ð7ä�gœs×#Ñ#ÜÐ4Ó5Ð5ä‡M‚M�&œ#˜f›+ wÕ/ó    c                 ó,   • [         R                  " 5       $ )zq
Check whether the PRNG has been seeded with enough data.

:return: 1 if the PRNG is seeded enough, 0 otherwise.
)r   ÚRAND_status© r   r   Ústatusr   ,   s   € ô ×ÒÓÐr   )r   r	   r   r   ÚreturnÚNone)r   r   )Ú__doc__Ú
__future__r   ÚwarningsÚOpenSSL._utilr   r   ÚwarnÚDeprecationWarningr   r   r   r   r   Ú<module>r       s4   ðñõ #ã å %à ‡‚ØDØØòô0õ4r   