password

package
v0.0.0-...-1f0a743 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AskDoublePassword

func AskDoublePassword() []byte

AskDoublePassword will ask for a password (and confirmation) on the commandline

func AskPassword

func AskPassword() []byte

AskPassword will ask for a password (without confirmation) on the commandline

func FetchPassword

func FetchPassword(addr *address.Address) ([]byte, error)

FetchPassword tries to figure out the password of the given address. It can do so by checking keychains and such, or when all fails, ask it from the user.

func StorePassword

func StorePassword(addr *address.Address, pwd []byte) error

StorePassword will store the given password into the keychain if possible

Types

type KeyChain

type KeyChain struct{}

KeyChain is a structure that allows you to easily store or fetch passwords from a keychain or vault like system

func (*KeyChain) Fetch

func (kc *KeyChain) Fetch(addr address.Address) ([]byte, error)

Fetch returns a key/password for the given address

func (*KeyChain) IsAvailable

func (kc *KeyChain) IsAvailable() bool

IsAvailable returns true when a keychain is available

func (*KeyChain) Store

func (kc *KeyChain) Store(addr address.Address, key []byte) error

Store stores a key/password for the given address in the keychain/vault

Jump to

Keyboard shortcuts

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