encryption

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrMissingPluginPath is the error returned when a projection manifest specifies a "module: plugin" but no PluginPath
	ErrMissingPluginPath = fmt.Errorf("plugin-path is required for encryption module 'plugin'")
)

Functions

This section is empty.

Types

type Module

type Module interface {
	// Encrypt takes some []byte and returns them encrypted
	Encrypt([]byte) ([]byte, error)
	// Keys returns a list of key.Key used to decrypt the result of Encrypt()
	DecryptionKeys() ([]key.Key, error)
	// Decrypt takes some []byte and returns them unencrypted
	Decrypt([]byte) ([]byte, error)
}

Module allows a projection to encrypt its data elements. This allows implementation to be abstracted from use.

func NewModuleFromEncryptionConfig

func NewModuleFromEncryptionConfig(c conf.Encryption) (Module, error)

NewModuleFromEncryptionConfig returns a new encryption module it handles opening up any files referenced in the configs and passing io.Readers to the referenced encryption module's setup

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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