keychain

package
v0.0.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const PrivateKeyStoreKey = "private_key"
View Source
const PublicKeyStoreKey = "public_key"

Variables

View Source
var (
	ErrKeyPairNotFound = errors.New("No key pair found in the local db.")
)

Functions

func New

func New(store db.Store) *keychain

Types

type Keychain

type Keychain interface {
	GenerateKeyPair() ([]byte, []byte, error)
	GetStoredKeyPairInLibP2PFormat() (crypto.PrivKey, crypto.PubKey, error)
	GenerateKeyPairWithForce() ([]byte, []byte, error)
	Sign([]byte) ([]byte, error)
}

Jump to

Keyboard shortcuts

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