shamir

package
v1.3.7 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2020 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ShamirSeal

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

ShamirSeal implements the seal.Access interface for Shamir unseal

func NewSeal

func NewSeal(logger log.Logger) *ShamirSeal

NewSeal creates a new ShamirSeal with the provided logger

func (*ShamirSeal) Decrypt

func (s *ShamirSeal) Decrypt(_ context.Context, in *physical.EncryptedBlobInfo) ([]byte, error)

func (*ShamirSeal) Encrypt

func (s *ShamirSeal) Encrypt(_ context.Context, plaintext []byte) (*physical.EncryptedBlobInfo, error)

Encrypt is used to encrypt the plaintext using the aead held by the seal.

func (*ShamirSeal) Finalize

func (s *ShamirSeal) Finalize(_ context.Context) error

Finalize is called during shutdown. This is a no-op since ShamirSeal doesn't require any cleanup.

func (*ShamirSeal) GetKey added in v1.3.0

func (s *ShamirSeal) GetKey() []byte

func (*ShamirSeal) Init

func (s *ShamirSeal) Init(_ context.Context) error

Init is called during core.Initialize. No-op at the moment.

func (*ShamirSeal) KeyID

func (s *ShamirSeal) KeyID() string

KeyID returns the last known key id.

func (*ShamirSeal) SealType

func (s *ShamirSeal) SealType() string

SealType returns the seal type for this particular seal implementation.

func (*ShamirSeal) SetKey added in v1.3.0

func (s *ShamirSeal) SetKey(key []byte) error

Jump to

Keyboard shortcuts

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