Documentation ¶
Index ¶
Constants ¶
View Source
const ( Alpha = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" Alnum = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" Code = "ABCDEFGHJKLMNPRSTUVWXYZ23456789" Password = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789&~#([-|_^@)]{}$*,?;.:/!<>" )
Variables ¶
This section is empty.
Functions ¶
func Simple ¶
Simple is a simple generator using a given len and range. Example use: rndstr.Simple(10, rndstr.Alnum)
func SimpleFastReader ¶
SimpleFastReader can be used with a random source, such as crypto/rand
Unsafe for secure operations but fast.
Usage: rndstr.SimpleFastReader(10, rndstr.Alnum, rand.Reader)
func SimpleReader ¶
SimpleReader can be used with a random source, such as crypto/rand
This is fairly slow and will consume at least 4 bytes of random input per generated character. This is however secure and follows best practices in random number generation.
Usage: rndstr.SimpleReader(10, rndstr.Alnum, rand.Reader)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.