Help us shape the future of Go! Take the 2026 Go Developer Survey

tPassword

package module
v1.1.4 Latest Latest
Warning

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

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

README

tPassword

A small Go library for generating random passwords, built on crypto/rand.

go get github.com/tPortal-Dev/tPassword

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptyCharset  = errors.New("no charset selected")
	ErrInvalidLength = errors.New("invalid length")
)

Functions

func Generate

func Generate(length int, options ...Option) (string, error)

func GenerateMulti

func GenerateMulti(count, length int, options ...Option) ([]string, error)

func GenerateMultiWithCustomCharset

func GenerateMultiWithCustomCharset(count, length int, charset string) ([]string, error)

func GenerateWithCustomCharset

func GenerateWithCustomCharset(length int, charset string) (string, error)

Types

type Option

type Option func(*config)

func WithSymbols

func WithSymbols() Option

func WithUppercase

func WithUppercase() Option

func WithoutDigits added in v1.1.4

func WithoutDigits() Option

func WithoutLowercase added in v1.1.4

func WithoutLowercase() Option

Jump to

Keyboard shortcuts

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