keystore

package
v0.0.0-...-b6b96b9 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var New = func(savePath string) *KeyStore {
	return &KeyStore{
		savePath: savePath,
	}
}

Functions

This section is empty.

Types

type AccountJson

type AccountJson struct {
	Salt       KeyProtectSalt   `json:"salt"`
	Addr       account.MetaAddr `json:"addr"`
	CipherText []byte           `json:"cipher_text"`
	Version    int32            `json:"version"`
}

type KeyProtectSalt

type KeyProtectSalt [16]byte

func (KeyProtectSalt) MarshalText

func (kp KeyProtectSalt) MarshalText() ([]byte, error)

func (*KeyProtectSalt) UnmarshalText

func (kp *KeyProtectSalt) UnmarshalText(text []byte) error

type KeyStore

type KeyStore struct {
	// contains filtered or unexported fields
}

func (*KeyStore) GetAccount

func (ks *KeyStore) GetAccount() *account.Account

func (*KeyStore) Load

func (ks *KeyStore) Load() error

func (*KeyStore) Open

func (ks *KeyStore) Open(passwd string) error

func (*KeyStore) Save

func (ks *KeyStore) Save() error

func (*KeyStore) SaveByNewPassword

func (ks *KeyStore) SaveByNewPassword(passwd string) error

func (*KeyStore) SetAccount

func (ks *KeyStore) SetAccount(act *account.Account)

Jump to

Keyboard shortcuts

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