seal

package
v1.0.0-beta1 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2018 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Shamir        = "shamir"
	PKCS11        = "pkcs11"
	AliCloudKMS   = "alicloudkms"
	AWSKMS        = "awskms"
	GCPCKMS       = "gcpckms"
	AzureKeyVault = "azurekeyvault"
	Test          = "test-auto"
)

Variables

This section is empty.

Functions

func ReverseBytes added in v1.0.0

func ReverseBytes(in []byte) []byte

reverseBytes is a helper to simulate "encryption/decryption" on protected values.

Types

type Access added in v1.0.0

type Access interface {
	SealType() string
	KeyID() string

	Init(context.Context) error
	Finalize(context.Context) error

	Encrypt(context.Context, []byte) (*physical.EncryptedBlobInfo, error)
	Decrypt(context.Context, *physical.EncryptedBlobInfo) ([]byte, error)
}

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

type Envelope added in v1.0.0

type Envelope struct{}

func NewEnvelope added in v1.0.0

func NewEnvelope() *Envelope

func (*Envelope) Decrypt added in v1.0.0

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

func (*Envelope) Encrypt added in v1.0.0

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

type EnvelopeInfo added in v1.0.0

type EnvelopeInfo struct {
	Ciphertext []byte
	Key        []byte
	IV         []byte
}

type TestSeal added in v1.0.0

type TestSeal struct{}

func (*TestSeal) Decrypt added in v1.0.0

func (t *TestSeal) Decrypt(_ context.Context, dwi *physical.EncryptedBlobInfo) ([]byte, error)

func (*TestSeal) Encrypt added in v1.0.0

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

func (*TestSeal) Finalize added in v1.0.0

func (t *TestSeal) Finalize(_ context.Context) error

func (*TestSeal) Init added in v1.0.0

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

func (*TestSeal) KeyID added in v1.0.0

func (t *TestSeal) KeyID() string

func (*TestSeal) SealType added in v1.0.0

func (t *TestSeal) SealType() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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