Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var RandomKeyCharacters = []byte("abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ")
RandomKeyCharacters is a []byte of the characters to choose from when generating random keys.
var RandomKeyIntegers = []byte("0123456789")
Functions ¶
func GenerateRandomBytes ¶
GenerateRandomBytes returns securely generated random bytes. It will return an error if the system's secure random number generator fails to function correctly, in which case the caller should not continue.
func GenerateRandomString ¶
GenerateRandomString returns a URL-safe, base64 encoded securely generated random string. It will return an error if the system's secure random number generator fails to function correctly, in which case the caller should not continue.
func RandomIntKey ¶
RandomIntKey generates a random key at the given length.
The first time this is called, the rand.Seed will be set to the current time.
Types ¶
This section is empty.