keystore

package
v0.0.0-...-ee95d54 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyPair

type KeyPair struct {
	Pub  ed25519.PublicKey
	Priv ed25519.PrivateKey
}

func NewKeyPair

func NewKeyPair() *KeyPair

func (*KeyPair) GetAddr

func (p *KeyPair) GetAddr() string

type KeyStore

type KeyStore interface {
	PutKeys(username string, keyPair *KeyPair) error
	LoadKeys(userName, password string) (*KeyPair, error)
}

func NewLevelDBKeyStore

func NewLevelDBKeyStore(username, keystorePath string) (KeyStore, error)

type LevelDBKeyStore

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

LevelDBKeyStore is a temporary solution for keeping hot node keys. The target state is an encrypted storage with password authentication.

func (*LevelDBKeyStore) LoadKeys

func (s *LevelDBKeyStore) LoadKeys(userName, password string) (*KeyPair, error)

func (*LevelDBKeyStore) PutKeys

func (s *LevelDBKeyStore) PutKeys(username string, keyPair *KeyPair) error

Jump to

Keyboard shortcuts

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