genstring

package module
v0.0.0-...-e70bb00 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2023 License: MIT Imports: 7 Imported by: 0

README

genstring

String generation tools

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alphabet

type Alphabet string
const (
	Base16Lower     Alphabet = "0123456789abcdef"
	Base16Upper     Alphabet = "0123456789ABCDEF"
	Base32Lower     Alphabet = "0123456789abcdefghijklmnopqrstuv"
	Base32Upper     Alphabet = "0123456789ABCDEFGHIJKLMNOPQRSTUV"
	Crockford       Alphabet = "0123456789ABCDEFGHJKMNPQRSTVWXYZ"
	Base36Lower     Alphabet = "0123456789abcdefghijklmnopqrstuvwxyz"
	Base36Upper     Alphabet = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
	Base58          Alphabet = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
	Base62          Alphabet = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
	Base64          Alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
	Base64URL       Alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"
	PasswordCharAll Alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+*/=~!@#$%^&*"
	ASCII85         Alphabet = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!#$%&()*+-;<=>?@^_`{|}~"
)

func (Alphabet) MaxEncBits

func (a Alphabet) MaxEncBits() int

func (Alphabet) MinEncBits

func (a Alphabet) MinEncBits() int

func (Alphabet) PermuteBytes

func (a Alphabet) PermuteBytes() Alphabet

func (Alphabet) PermuteRunes

func (a Alphabet) PermuteRunes() Alphabet

type CryptoRandomGenerator

type CryptoRandomGenerator struct {
	// contains filtered or unexported fields
}

func NewCryptoRandomGenerator

func NewCryptoRandomGenerator(alphabet Alphabet) CryptoRandomGenerator

func (CryptoRandomGenerator) Password

func (c CryptoRandomGenerator) Password(length int) Password

func (CryptoRandomGenerator) Passwords

func (c CryptoRandomGenerator) Passwords(length, count int) []Password

type Password

type Password string

func (Password) GoString

func (p Password) GoString() string

func (Password) String

func (p Password) String() string

type PseudoRandomGenerator

type PseudoRandomGenerator struct {
	// contains filtered or unexported fields
}

func NewPseudoRandomGenerator

func NewPseudoRandomGenerator(alphabet Alphabet) *PseudoRandomGenerator

func (*PseudoRandomGenerator) Password

func (p *PseudoRandomGenerator) Password(length int) Password

func (*PseudoRandomGenerator) Passwords

func (p *PseudoRandomGenerator) Passwords(length, count int) []Password

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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