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 (Alphabet) MinEncBits ¶
func (Alphabet) PermuteBytes ¶
func (Alphabet) PermuteRunes ¶
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 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
Source Files ¶
Click to show internal directories.
Click to hide internal directories.