This website collects cookies to deliver better user experience
Generate cryptographically safe passwords with Python in 4 lines of code
Generate cryptographically safe passwords with Python in 4 lines of code
Introduction
The secrets module is used for generating cryptographically strong random numbers suitable for managing data such as passwords, account authentication, security tokens, and related secrets.
In particular, secrets should be used in preference to the default pseudo-random number generator in the random module, which is designed for modelling and simulation, not security or cryptography.