a �DOg��@spgd�ZddlZddlZddlmZddlmZe�ZejZ ej Z dd�Z dZ ddd �Z dd d �Zdd d �ZdS))�choice� randbelow�randbits� SystemRandom� token_bytes� token_hex� token_urlsafe�compare_digest�N)r)rcCs|dkrtd��t�|�S)Nr zUpper bound must be positive.)� ValueError�_sysrand� _randbelow)Zexclusive_upper_bound�r �/usr/lib64/python3.9/secrets.pyrsr� cCs|dur t}t�|�S)N)�DEFAULT_ENTROPYr � randbytes��nbytesr r rr"s rcCst�t|���d�S)N�ascii)�binasciiZhexlifyr�decoderr r rr0s rcCst|�}t�|��d��d�S)N�=r)r�base64Zurlsafe_b64encode�rstripr)r�tokr r rr=s r)N)N)N)�__all__rr�hmacr�randomrr � getrandbitsrrrrrrrr r r r� s