secrets

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2019 License: Apache-2.0 Imports: 2 Imported by: 64

Documentation

Overview

Package secrets provides a set of portable APIs for message encryption and decryption.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

Keeper does encryption and decryption. To create a Keeper, use constructors found in provider-specific subpackages.

func NewKeeper

func NewKeeper(k driver.Keeper) *Keeper

NewKeeper is intended for use by a specific provider implementation to create a Keeper.

func (*Keeper) Decrypt

func (k *Keeper) Decrypt(ctx context.Context, ciphertext []byte) ([]byte, error)

Decrypt decrypts the ciphertext and returns the plaintext or an error.

func (*Keeper) Encrypt

func (k *Keeper) Encrypt(ctx context.Context, plaintext []byte) ([]byte, error)

Encrypt encrypts the plaintext and returns the cipher message.

Directories

Path Synopsis
Package awskms provides functionality to encrypt and decrypt secrets using AWS KMS.
Package awskms provides functionality to encrypt and decrypt secrets using AWS KMS.
Package driver defines interfaces to be implemented for providers of the secrets package.
Package driver defines interfaces to be implemented for providers of the secrets package.
Package drivertest provides a conformance test for implementations of the secrets driver.
Package drivertest provides a conformance test for implementations of the secrets driver.
Package gcpkms provides functionality to encrypt and decrypt secrets using Google Cloud KMS.
Package gcpkms provides functionality to encrypt and decrypt secrets using Google Cloud KMS.
hashivault module
Package localsecrets provides a way to encrypt and decrypt small messages without making network calls to a third party service.
Package localsecrets provides a way to encrypt and decrypt small messages without making network calls to a third party service.
vault module

Jump to

Keyboard shortcuts

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