rand

package
v1.46.0 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2024 License: MIT Imports: 5 Imported by: 4

Documentation

Index

Constants

View Source
const (
	Uppercase    = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
	Lowercase    = "abcdefghijklmnopqrstuvwxyz"
	Alpha        = Uppercase + Lowercase
	Digit        = "0123456789"
	AlphaNumeric = Alpha + Digit
	Punctuation  = "!@#$%^&*~?=-+_./|"
	Password     = AlphaNumeric + Punctuation
)

Common sets for random strings

Variables

This section is empty.

Functions

func HardwareAddr

func HardwareAddr() net.HardwareAddr

Obtain the current host's MAC address

func HardwareKey

func HardwareKey() string

Obtain the current host's MAC address as a hex string

func RandomBytes

func RandomBytes(n int) []byte

func RandomString

func RandomString(n int) string

func RandomStringFromSet

func RandomStringFromSet(n int, set string) string

func ReadRandom

func ReadRandom(b []byte)

Types

This section is empty.

Jump to

Keyboard shortcuts

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