keystore

package module
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Verify

func Verify(signature []byte, publicKey []byte, data []byte) (bool, error)

Types

type Keystore

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

func New

func New(path string) (*Keystore, error)

func (*Keystore) Close

func (k *Keystore) Close() error

func (*Keystore) CreateKey

func (k *Keystore) CreateKey(id, entropy []byte) (crypto.PrivKey, crypto.PubKey, error)

func (*Keystore) GetKey

func (k *Keystore) GetKey(id []byte) (crypto.PrivKey, crypto.PubKey, error)

func (*Keystore) GetPublic

func (k *Keystore) GetPublic(key crypto.PrivKey) crypto.PubKey

func (*Keystore) HasKey

func (k *Keystore) HasKey(id []byte) (bool, error)

func (*Keystore) Open

func (k *Keystore) Open() error

func (*Keystore) Sign

func (k *Keystore) Sign(key crypto.PrivKey, data []byte) ([]byte, error)

func (*Keystore) Verify

func (k *Keystore) Verify(signature []byte, publicKey []byte, data []byte) (bool, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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