vault: Index | Files

package seal

import ""


Package Files

envelope.go seal.go seal_testing.go

type Access Uses

type Access struct {
    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 Uses

func NewTestSeal(opts *TestSealOpts) *Access

func (*Access) Decrypt Uses

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

func (*Access) Encrypt Uses

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

func (*Access) SetType Uses

func (a *Access) SetType(t string)

func (*Access) Type Uses

func (a *Access) Type() string

type Envelope Uses

type Envelope struct {
    // contains filtered or unexported fields

func NewEnvelope Uses

func NewEnvelope() *Envelope

func (*Envelope) Decrypt Uses

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

func (*Envelope) Encrypt Uses

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

type StoredKeysSupport Uses

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

func (StoredKeysSupport) String Uses

func (s StoredKeysSupport) String() string

type TestSealOpts Uses

type TestSealOpts struct {
    Logger     hclog.Logger
    StoredKeys StoredKeysSupport
    Secret     []byte
    Name       string

Package seal imports 6 packages (graph) and is imported by 15 packages. Updated 2020-01-13. Refresh now. Tools for package owners.