encryption

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const LocalEncryptionVersion = "v1"

Variables

This section is empty.

Functions

func UseBackend

func UseBackend(cfg *BackendConfig) (vault.EncryptionBackend, error)

Types

type BackendConfig

type BackendConfig struct {
	Name  string
	Local *LocalEncryption
}

func NewBackendConfig

func NewBackendConfig() *BackendConfig

type BackendInitFunc

type BackendInitFunc func(cfg *BackendConfig) (vault.EncryptionBackend, error)

type LocalEncryption

type LocalEncryption struct {
	SecretKey string
}

func NewLocalEncryption

func NewLocalEncryption(secretKey string) (*LocalEncryption, error)

func (*LocalEncryption) Decrypt

func (e *LocalEncryption) Decrypt(ctx context.Context, data string) (string, error)

func (*LocalEncryption) Encrypt

func (e *LocalEncryption) Encrypt(ctx context.Context, plaintext string) (string, error)

func (*LocalEncryption) Type

func (e *LocalEncryption) Type() string

func (*LocalEncryption) Version

func (e *LocalEncryption) Version() string

Jump to

Keyboard shortcuts

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