seal

package
v1.14.4 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: MPL-2.0 Imports: 6 Imported by: 58

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTestSeal added in v1.0.0

func NewTestSeal(opts *TestSealOpts) (Access, *ToggleableWrapper)

Types

type Access added in v1.0.0

type Access interface {
	wrapping.Wrapper
	wrapping.InitFinalizer

	GetWrapper() wrapping.Wrapper
}

Access is the embedded implementation of autoSeal that contains logic specific to encrypting and decrypting data, or in this case keys.

func NewAccess added in v1.14.0

func NewAccess(w wrapping.Wrapper) Access

func NewToggleableTestSeal added in v1.7.5

func NewToggleableTestSeal(opts *TestSealOpts) (Access, func(error))

type Envelope added in v1.0.0

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

func NewEnvelope added in v1.0.0

func NewEnvelope() *Envelope

func (*Envelope) Decrypt added in v1.0.0

func (e *Envelope) Decrypt(data *wrapping.EnvelopeInfo, aad []byte) ([]byte, error)

func (*Envelope) Encrypt added in v1.0.0

func (e *Envelope) Encrypt(plaintext, aad []byte) (*wrapping.EnvelopeInfo, error)

type StoredKeysSupport added in v1.4.0

type StoredKeysSupport int
const (
	// The 0 value of StoredKeysSupport is an invalid option
	StoredKeysInvalid StoredKeysSupport = iota
	StoredKeysNotSupported
	StoredKeysSupportedGeneric
	StoredKeysSupportedShamirRoot
)

func (StoredKeysSupport) String added in v1.4.0

func (s StoredKeysSupport) String() string

type TestSealOpts added in v1.4.0

type TestSealOpts struct {
	Logger     hclog.Logger
	StoredKeys StoredKeysSupport
	Secret     []byte
	Name       wrapping.WrapperType
}

type ToggleableWrapper added in v1.7.5

type ToggleableWrapper struct {
	wrapping.Wrapper
	// contains filtered or unexported fields
}

func (ToggleableWrapper) Decrypt added in v1.7.5

func (t ToggleableWrapper) Decrypt(ctx context.Context, info *wrapping.BlobInfo, opts ...wrapping.Option) ([]byte, error)

func (*ToggleableWrapper) Encrypt added in v1.7.5

func (t *ToggleableWrapper) Encrypt(ctx context.Context, bytes []byte, opts ...wrapping.Option) (*wrapping.BlobInfo, error)

func (*ToggleableWrapper) SetError added in v1.10.0

func (t *ToggleableWrapper) SetError(err error)

func (*ToggleableWrapper) Type added in v1.14.0

Jump to

Keyboard shortcuts

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