randomization

package
v0.0.0-...-4cb4cf9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// LegalCharactersAlphaNum is the set of legal characters for generating random alphanumeric strings
	LegalCharactersAlphaNum = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
	// LegalCharactersHex is the set of legal characters for generating random hexadecimal strings
	LegalCharactersHex = "0123456789abcdef"
)

Variables

This section is empty.

Functions

func RandomString

func RandomString(length int, legalCharacters string) (output string, err error)

RandomString generates a random string consisting of "length" runes randomly selected from the provided legalCharacters. crypto.rand is more secure than math.rand and does not need to be seeded.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL