mem

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service is the memory-based keystore.Service implementation.

Keys are stored in an in-memory map, where the key is the name of the private key, and the value is the structure where the actual private key and the password are stored.

func New

func New() *Service

New creates new memory-based keystore.Service implementation.

func (*Service) Exists

func (s *Service) Exists(name string) (bool, error)

func (*Service) ExportKey

func (s *Service) ExportKey(name, password string) ([]byte, error)

func (*Service) ImportKey

func (s *Service) ImportKey(name, password string, keyJson []byte) error

func (*Service) ImportPrivateKey

func (s *Service) ImportPrivateKey(name, password string, pk *ecdsa.PrivateKey) (err error)

func (*Service) Key

func (s *Service) Key(name, password string) (pk *ecdsa.PrivateKey, created bool, err error)

Jump to

Keyboard shortcuts

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