DEV Community

Discussion on: How To Generate Strong Passwords Using Python

Collapse
 
aminmansuri profile image
hidden_dude

Hmm.. python's random library is not cryptographically secure.
Are you sure this is sufficiently unguessable?

I'd use the secrets library instead.

If it's a password, presumably you'd want it as unguessable as possible.

Collapse
 
larymak profile image
Hillary Nyakundi

I am sure guessing that password is not easy, password with a mixture of uppercase, lowercase, numbers and special characters not easy..

Collapse
 
aminmansuri profile image
hidden_dude • Edited

Yes. But a sophisticated hacker can get your random password generator to generate the same passwords you did. Random is not as random as you think it is, so your program can be used to generate the passwords and lower the number of attempts needed to guess the password.

Random should not be used for security sensitive things.