Documentation ¶
Index ¶
Constants ¶
View Source
const ( // StdLen Standard length of uniuri string to achive ~95 bits of entropy. StdLen = 16 // UUIDLen Length of uniurl string to achive ~119 bits of entropy, closest // to what can be losslessly converted to UUIDv4 (122 bits). UUIDLen = 20 )
Variables ¶
View Source
var StdChars = []byte("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")
StdChars Standard characters allowed in uniuri string.
Functions ¶
func New ¶
func New() string
New returns a new random string of the standard length, consisting of standard characters.
func NewLen ¶
NewLen returns a new random string of the provided length, consisting of standard characters.
func NewLenChars ¶
NewLenChars returns a new random string of the provided length, consisting of the provided byte slice of allowed characters (maximum 256).
Types ¶
Click to show internal directories.
Click to hide internal directories.