You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 14, 2020. It is now read-only.
According to the Go docs about the math/rand package:
The default number generator is deterministic, so it’ll produce the same sequence of numbers each time by default. To produce varying sequences, give it a seed that changes. Note that this is not safe to use for random numbers you intend to be secret, use crypto/rand for those.
If the only requirement for those tokens is that they be unique within a run of the server, that's probably fine. If they need to be unique across runs, then it's important to set the seed. And if they need to be cryptographically secure (impossible to predict), then that's the wrong random number generator to use.
According to the Go docs about the
math/rand
package:So is RandSeq supposed to be deterministic?
The text was updated successfully, but these errors were encountered: