padding

package
v0.0.0-...-68e2c78 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const Random = "RANDOM"

Random indicates that a random character from the symbol alphabet should be used.

Variables

This section is empty.

Functions

func Do

func Do(pw string, cfg *config.GeneratorConfig, r *rand.Rand) (string, error)

Do returns parts with the configured digit and symbol padding applied.

func Styles

func Styles() []string

Styles returns a list of available padding styles.

Types

type Style

type Style string

Style represents a style of symbol padding

const (
	// Fixed is a padding style that adds the given number of characters to the
	// start and end of a password. Padding character can be specified or
	// randomly chosen from an alphabet.
	Fixed Style = "FIXED"

	// Adaptive is a padding style that pads a password to a given length. The
	// padding character can be specified or randomly chosen from an alphabet.
	Adaptive Style = "ADAPTIVE"

	// None is a padding style that does no padding.
	None Style = "NONE"
)

Jump to

Keyboard shortcuts

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