password

package
v0.22.3 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LowercaseLetters = "abcdefghijklmnopqrstuvwxyz"
	UppercaseLetters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
	Digits           = "0123456789"
	Symbols          = "~!@#$%^&*()_+`-={}|[]\\:\"<>?,./"
)

Variables

This section is empty.

Functions

func Generate

func Generate(cmp PasswordComposition) (string, error)

Generate password consisting of given number of lowercase letters, uppercase letters, digits, and "symbol" characters.

func Shuffle

func Shuffle[T any](s []T) error

Fisher-Yates shuffle

Types

type PasswordComposition

type PasswordComposition struct {
	NumLowercase, NumUppercase, NumDigits, NumSymbols uint
}

Jump to

Keyboard shortcuts

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