crypto

package
v3.1.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2017 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const MasterPasswordSeed = "com.lyndir.masterpassword"

MasterPasswordSeed is the default seed and allows it to be compatible with http://masterpasswordapp.com/algorithm.html

View Source
const MasterPasswordTypes = "basic, long, maximum, medium, name, phrase, pin, short"

MasterPasswordTypes is for listing the current supported password types.

Default: long
View Source
const MpwSeries = "2.6"

MpwSeries denotes the mpw cli client version compatibility.

Variables

This section is empty.

Functions

func MasterPassword

func MasterPassword(mpwseed, passwordType, user, password, site string, counter uint32) (string, error)

MasterPassword returns a derived password according to: http://masterpasswordapp.com/algorithm.html

Valid PasswordTypes: basic, long, maximum, medium, name, phrase, pin, short

NOTE: mpwseed == "", will use the default Master Password Seed, do not change unless you have specific requirements

Types

type MasterPW

type MasterPW struct {
	MasterPasswordSeed string `toml:"masterPasswordSeed,omitempty"`
	PasswordType       string `toml:"passwordType,omitempty"`
	Fullname           string `toml:"fullname,omitempty"`
	Password           string `toml:"password,omitempty"`
	Site               string `toml:"site,omitempty"`
	Counter            uint32 `toml:"counter,omitempty"` // Counter >= 1
}

MasterPW contains all relevant items for MasterPassword to act upon.

func NewMasterPassword

func NewMasterPassword() *MasterPW

NewMasterPassword returns a new empty MasterPW struct with counter==1 and pwtype=="long"

func (*MasterPW) GetPasswordTypes

func (m *MasterPW) GetPasswordTypes() []string

GetPasswordTypes returns a sorted list of valid password types

func (*MasterPW) IsValidPasswordType

func (m *MasterPW) IsValidPasswordType(passwordType string) bool

func (*MasterPW) MasterPassword

func (m *MasterPW) MasterPassword() (string, error)

MasterPassword returns a derived password according to: http://masterpasswordapp.com/algorithm.html

Valid PasswordTypes: basic, long, maximum, medium, name, phrase, pin, short

Jump to

Keyboard shortcuts

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