Skip to content

Why the cryptographically secure random generator requirement? #1770

Answered by ysthakur
PlaceReporter99 asked this question in Q&A
Discussion options

You must be logged in to vote

I'm assuming it was just used because it's a convenient way to generate random strings with a low risk of generating the same string twice. If you wanted to use the random module instead, you'd need something a lot longer, like maybe ''.join(random.choices(string.ascii_uppercase + string.digits, k=16)) (from this answer)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by PlaceReporter99
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants