engine

package
v0.0.0-...-d95dd9a Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PIN is a 6-digit PIN code, separated by `-`.
	// For example, `0-1-2-3-4-5`.
	PIN = iota
	// PlainLowerCase is niceware generated 4-word password,
	// separated by `-`.
	// For example, `hello-world-from-luxio`.
	PlainLowerCase
	// WithSpecialCharacters is niceware generated 4-word password,
	// title cased, separated by `-`, with a fixed postfix `#1`.
	// For example, `Hello-World-From-Luxio-#1`.
	WithSpecialCharacters
	// Password is ... password of length 13, created from the set of
	// case-insensitive alpha-numeric (a-z, 0-9), with a fixed postfix `#A`.
	// For example, `abcdefghij123#A`.
	// This is used in the case that niceware generated passwords are too
	// long for use.
	Password
)
View Source
const (
	PinLength   = 6
	PwdLength   = 13
	PwdSizeByte = 32
)

Variables

This section is empty.

Functions

func DomainFromUrl

func DomainFromUrl(link string) string

func Generate

func Generate(in []byte, format int) (string, error)

Types

type AccountInfo

type AccountInfo struct {
	Domain   string
	Username string
}

func (*AccountInfo) Deserialize

func (acc *AccountInfo) Deserialize(in []byte) (string, string)

func (*AccountInfo) Serialize

func (acc *AccountInfo) Serialize() []byte

Serialize returns length-prefixed, byte array from account info.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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