Tutorialspoint

Python Random and Secrets Example

import secrets
import random
secNum = random.SystemRandom().random()
print("secure number is ", secNum)
print("Secure byte token", secrets.token_bytes(16))

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.