keystore

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockKeystore

type MockKeystore struct {
	CreateKeyValue             string
	ExportKeyValue             []byte
	CreateAndExportKeyID       string
	CreateAndExportPubKeyValue []byte
	ImportKeyID                string
	GetKeyHandleValue          *keyset.Handle
	KeyManagerValue            *mockkms.KeyManager
	CreateKeyErr               error
	ExportKeyErr               error
	CreateAndExportKeyErr      error
	ImportKeyErr               error
	GetKeyHandleErr            error
}

MockKeystore is a mock Keystore.

func (*MockKeystore) CreateAndExportKey

func (m *MockKeystore) CreateAndExportKey(kt kms.KeyType) (string, []byte, error)

CreateAndExportKey creates a new key and exports its public part.

func (*MockKeystore) CreateKey

func (m *MockKeystore) CreateKey(kt kms.KeyType) (string, error)

CreateKey creates a new key.

func (*MockKeystore) ExportKey

func (m *MockKeystore) ExportKey(keyID string) ([]byte, error)

ExportKey exports a public key.

func (*MockKeystore) GetKeyHandle

func (m *MockKeystore) GetKeyHandle(keyID string) (interface{}, error)

GetKeyHandle retrieves key handle by keyID.

func (*MockKeystore) ImportKey

func (m *MockKeystore) ImportKey(der []byte, kt kms.KeyType, kid string) (string, error)

ImportKey imports private key bytes (in DER format) of kt type into KMS and returns key ID.

func (*MockKeystore) KeyManager

func (m *MockKeystore) KeyManager() kms.KeyManager

KeyManager returns KeyManager instance.

Jump to

Keyboard shortcuts

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