encryption

package
v2.0.6 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2026 License: Apache-2.0 Imports: 16 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncryptUpdateExpressionValues

func EncryptUpdateExpressionValues(
	ctx context.Context,
	svc *Service,
	metadata *model.Metadata,
	updateExpression string,
	exprAttrNames map[string]string,
	exprAttrValues map[string]types.AttributeValue,
) error

EncryptUpdateExpressionValues mutates exprAttrValues in-place by encrypting values assigned to encrypted fields. It currently supports direct SET assignments and if_not_exists() defaults for encrypted fields.

func FailClosedIfEncryptedWithoutKMSKeyARN

func FailClosedIfEncryptedWithoutKMSKeyARN(sess *session.Session, metadata *model.Metadata) error

func MetadataHasEncryptedFields

func MetadataHasEncryptedFields(metadata *model.Metadata) bool

Types

type Service

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

Service implements envelope encryption for DynamoDB attribute values using AWS KMS.

func NewService

func NewService(keyARN string, kmsClient kmsAPI) *Service

func NewServiceFromAWSConfig

func NewServiceFromAWSConfig(keyARN string, cfg aws.Config) *Service

func NewServiceFromAWSConfigWithRand

func NewServiceFromAWSConfigWithRand(keyARN string, cfg aws.Config, rng io.Reader) *Service

func NewServiceWithRand

func NewServiceWithRand(keyARN string, kmsClient kmsAPI, rng io.Reader) *Service

func (*Service) DecryptAttributeValue

func (s *Service) DecryptAttributeValue(ctx context.Context, attributeName string, envelope types.AttributeValue) (types.AttributeValue, error)

func (*Service) EncryptAttributeValue

func (s *Service) EncryptAttributeValue(ctx context.Context, attributeName string, av types.AttributeValue) (types.AttributeValue, error)

Jump to

Keyboard shortcuts

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