Documentation
¶
Overview ¶
Package random holds a few functions for working with random numbers
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Password ¶
Password creates a crypto strong password which is just about memorable. The password is composed of printable ASCII characters from the base64 alphabet.
Requires password strength in bits. 64 is just about memorable 128 is secure
func Seed ¶ added in v1.53.3
func Seed() error
Seed the global math/rand with crypto strong data
This doesn't make it OK to use math/rand in crypto sensitive environments - don't do that! However it does help to mitigate the problem if that happens accidentally. This would have helped with CVE-2020-28924 - #4783
As of Go 1.20 there is no reason to call math/rand.Seed with a random value as it is self seeded to a random 64 bit number so this does nothing.
Types ¶
This section is empty.