kms

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package kms implements Data Masking providers with the AWS Encryption SDK. This initial provider does not implement TypeScript's data-key cache.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientProvider

type ClientProvider func(context.Context, string) (*awskms.Client, error)

ClientProvider supplies a regional AWS SDK client template. The provider clones its options to bind each operation's context without mutating it. Implementations must support concurrent calls.

type Config

type Config struct {
	// Keys contains the generator identifier first, followed by additional keys.
	Keys []string
	// A nil ClientProvider uses the default AWS configuration and regional clients.
	ClientProvider ClientProvider
}

type Provider

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

Provider uses authenticated AWS Encryption SDK messages and strict key commitment. It is safe for concurrent calls. Each encryption obtains fresh materials; cache age/capacity/message/byte limits are not implemented yet.

func New

func New(ctx context.Context, options Config) (*Provider, error)

func (*Provider) Decrypt

func (p *Provider) Decrypt(ctx context.Context, data string, encryptionContext map[string]string) (string, error)

func (*Provider) Encrypt

func (p *Provider) Encrypt(ctx context.Context, data string, encryptionContext map[string]string) (string, error)

Jump to

Keyboard shortcuts

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