seal

package
v1.4.6 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2020 License: MPL-2.0 Imports: 6 Imported by: 58

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Access added in v1.0.0

type Access struct {
	wrapping.Wrapper
	OverriddenType string
}

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

func NewTestSeal added in v1.0.0

func NewTestSeal(opts *TestSealOpts) *Access

func (*Access) Decrypt added in v1.0.0

func (a *Access) Decrypt(ctx context.Context, data *wrapping.EncryptedBlobInfo, aad []byte) (pt []byte, err error)

func (*Access) Encrypt added in v1.0.0

func (a *Access) Encrypt(ctx context.Context, plaintext, aad []byte) (blob *wrapping.EncryptedBlobInfo, err error)

func (*Access) SetType added in v1.4.0

func (a *Access) SetType(t string)

func (*Access) Type added in v1.4.0

func (a *Access) Type() string

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
	StoredKeysSupportedShamirMaster
)

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       string
}

Jump to

Keyboard shortcuts

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