password

package
v1.14.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2023 License: Apache-2.0 Imports: 2 Imported by: 26

Documentation

Overview

Package password contains a simple password generator.

Index

Constants

This section is empty.

Variables

View Source
var Default = Settings{
	CharacterSet: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",
	Length:       27,
}

Default password generation settings.

Functions

func Generate

func Generate() (string, error)

Generate a random, 27 character password that may consist of lowercase letters, uppercase letters, or numbers.

Types

type Settings

type Settings struct {
	// CharacterSet of allowed password characters.
	CharacterSet string

	// Length of generated passwords.
	Length int
}

Settings for password generation.

func (Settings) Generate

func (s Settings) Generate() (string, error)

Generate a password.

Jump to

Keyboard shortcuts

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