wordlist

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnknownName = errors.New("unknown wordlist name")

Functions

func MetaStrings

func MetaStrings() []string

MetaStrings returns a slice of all String values of the enum

Types

type Meta

type Meta uint8
const (
	Long Meta = iota
	Short1
	Short2
)

func MetaString

func MetaString(s string) (Meta, error)

MetaString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func MetaValues

func MetaValues() []Meta

MetaValues returns all values of the enum

func (Meta) Description

func (m Meta) Description() string

func (Meta) IsAMeta

func (i Meta) IsAMeta() bool

IsAMeta returns "true" if the value is listed in the enum definition. "false" otherwise

func (Meta) List

func (m Meta) List() (Wordlist, error)

func (Meta) MarshalText

func (i Meta) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface for Meta

func (Meta) String

func (i Meta) String() string

func (Meta) URL

func (m Meta) URL() string

func (*Meta) UnmarshalText

func (i *Meta) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface for Meta

func (Meta) Var

func (m Meta) Var() string

type Wordlist

type Wordlist []string

func EFF_Long

func EFF_Long() Wordlist

EFF_Long is the default wordlist used for passphrases. It contains 7776 words and is designed for memorability and password strength.

Source: https://www.eff.org/dice

func EFF_Short1

func EFF_Short1() Wordlist

EFF_Short1 features only short words. It contains 1296 words and may be more efficient to type, but suggests using more words to maintain security.

Source: https://www.eff.org/dice

func EFF_Short2

func EFF_Short2() Wordlist

EFF_Short2 features longer words and may be more memorable. It contains 1296 words and may be more efficient to type, but suggests using more words to maintain security.

Source: https://www.eff.org/dice

func (Wordlist) RandWord

func (w Wordlist) RandWord() string

func (Wordlist) RandWords

func (w Wordlist) RandWords(n int) []string

func (Wordlist) RandWordsWithNumber

func (w Wordlist) RandWordsWithNumber(n int) []string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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