vks

package
v0.0.0-...-b9fdcee Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2021 License: Apache-2.0, BSD-2-Clause, MIT Imports: 8 Imported by: 6

Documentation

Overview

Copyright © 2017 VMware, Inc. All Rights Reserved. SPDX-License-Identifier: BSD-2-Clause

Copyright © 2017 VMware, Inc. All Rights Reserved. SPDX-License-Identifier: BSD-2-Clause

Copyright © 2017 VMware, Inc. All Rights Reserved. SPDX-License-Identifier: BSD-2-Clause

Copyright © 2017 VMware, Inc. All Rights Reserved. SPDX-License-Identifier: BSD-2-Clause

Copyright © 2017 VMware, Inc. All Rights Reserved. SPDX-License-Identifier: BSD-2-Clause

Copyright © 2017 VMware, Inc. All Rights Reserved. SPDX-License-Identifier: BSD-2-Clause

Index

Constants

View Source
const (
	PropertyNameKeyStore     = "keyStore"
	PropertyNameKeyStoreType = "type"
)

Variables

View Source
var KeyStoreRegistrar *keyStoreRegistrar = newRegistrar()

singleton registrar for key store types

Functions

This section is empty.

Types

type BoltKS

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

An implementation of a keystore using Bolt (https://github.com/boltdb/bolt)

func NewBoltKS

func NewBoltKS() *BoltKS

func (*BoltKS) CompleteInit

func (ks *BoltKS) CompleteInit(*config.KeyStoreConfig) error

func (*BoltKS) Create

func (ks *BoltKS) Create(alias string, key []byte) error

func (*BoltKS) Delete

func (ks *BoltKS) Delete(alias string) error

func (*BoltKS) Init

func (ks *BoltKS) Init(cfg *config.KeyStoreConfig) error

func (*BoltKS) Initialized

func (ks *BoltKS) Initialized() bool

func (*BoltKS) Location

func (ks *BoltKS) Location() string

func (*BoltKS) NewInstance

func (ks *BoltKS) NewInstance() KeyStoreAdapter

func (*BoltKS) Read

func (ks *BoltKS) Read(alias string) ([]byte, error)

func (*BoltKS) Type

func (ks *BoltKS) Type() string

type InMemoryKS

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

An implementation of a keystore in-memory. Useful for testing. Not recommended for production!!

func NewInMemoryKS

func NewInMemoryKS() *InMemoryKS

func (*InMemoryKS) CompleteInit

func (ks *InMemoryKS) CompleteInit(*config.KeyStoreConfig) error

func (*InMemoryKS) Create

func (ks *InMemoryKS) Create(alias string, key []byte) error

func (*InMemoryKS) Delete

func (ks *InMemoryKS) Delete(alias string) error

func (*InMemoryKS) Init

func (ks *InMemoryKS) Init(cfg *config.KeyStoreConfig) error

func (*InMemoryKS) Initialized

func (ks *InMemoryKS) Initialized() bool

func (*InMemoryKS) Location

func (ks *InMemoryKS) Location() string

func (*InMemoryKS) NewInstance

func (ks *InMemoryKS) NewInstance() KeyStoreAdapter

func (*InMemoryKS) Read

func (ks *InMemoryKS) Read(alias string) ([]byte, error)

func (*InMemoryKS) Type

func (ks *InMemoryKS) Type() string

type KeyStoreAdapter

type KeyStoreAdapter interface {
	Init(*config.KeyStoreConfig) error
	CompleteInit(*config.KeyStoreConfig) error
	NewInstance() KeyStoreAdapter
	Initialized() bool

	Create(alias string, key []byte) error
	Read(alias string) ([]byte, error)
	Delete(alias string) error

	Type() string
	Location() string
}

type VirtualKeyStore

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

An implementation of a virtual key store over a collection of key stores using Polynomial Secret Sharing.

func GetVirtualKeyStoreFromConfig

func GetVirtualKeyStoreFromConfig(cfg *config.Config) (*VirtualKeyStore, error)

func NewVirtualKeyStore

func NewVirtualKeyStore() *VirtualKeyStore

func (*VirtualKeyStore) CompleteInit

func (vks *VirtualKeyStore) CompleteInit(*config.Config) error

func (*VirtualKeyStore) Create

func (vks *VirtualKeyStore) Create(alias string, key []byte) error

func (*VirtualKeyStore) Delete

func (vks *VirtualKeyStore) Delete(alias string) error

func (*VirtualKeyStore) Init

func (vks *VirtualKeyStore) Init(cfg *config.Config) error

func (*VirtualKeyStore) Initialized

func (vks *VirtualKeyStore) Initialized() bool

func (*VirtualKeyStore) Read

func (vks *VirtualKeyStore) Read(alias string) ([]byte, error)

Jump to

Keyboard shortcuts

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