transit

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2015 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Backend

func Backend() *framework.Backend

func Factory

func Factory(conf *logical.BackendConfig) (logical.Backend, error)

Types

type Policy

type Policy struct {
	Name       string `json:"name"`
	Key        []byte `json:"key"`
	CipherMode string `json:"cipher"`

	// Derived keys MUST provide a context and the
	// master underlying key is never used.
	Derived bool   `json:"derived"`
	KDFMode string `json:"kdf_mode"`
}

Policy is the struct used to store metadata

func DeserializePolicy

func DeserializePolicy(buf []byte) (*Policy, error)

func (*Policy) DeriveKey added in v0.2.0

func (p *Policy) DeriveKey(context []byte) ([]byte, error)

DeriveKey is used to derive the encryption key that should be used depending on the policy. If derivation is disabled the raw key is used and no context is required, otherwise the KDF mode is used with the context to derive the proper key.

func (*Policy) Serialize

func (p *Policy) Serialize() ([]byte, error)

Jump to

Keyboard shortcuts

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