vault

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InHouseVault

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

InHouseVault encrypts secrets using AES-GCM-256 with a locally injected key.

func NewInHouseVault

func NewInHouseVault(key []byte) (*InHouseVault, error)

NewInHouseVault creates an InHouseVault from a 32-byte AES-256 key.

func (*InHouseVault) Decrypt

func (v *InHouseVault) Decrypt(_ context.Context, ciphertext []byte) (string, error)

func (*InHouseVault) Encrypt

func (v *InHouseVault) Encrypt(_ context.Context, plaintext string) ([]byte, error)

func (*InHouseVault) HashKey

func (v *InHouseVault) HashKey() []byte

func (*InHouseVault) ProviderName

func (v *InHouseVault) ProviderName() string

type SecretVault

type SecretVault interface {
	Encrypt(ctx context.Context, plaintext string) (ciphertext []byte, err error)
	Decrypt(ctx context.Context, ciphertext []byte) (plaintext string, err error)
	ProviderName() string
	// HashKey returns the key used for HMAC-based change-detection hashes.
	// The returned slice must not be modified by the caller.
	HashKey() []byte
}

SecretVault is the pluggable encryption backend for secrets.

Jump to

Keyboard shortcuts

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