kms

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2025 License: MIT Imports: 7 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSKMS deprecated

type AWSKMS = awsV1kms.AWSKMS

AWSKMS implements the KeyManagementService interface and handles encryption/decryption in KMS.

Deprecated: AWS SDK v1 reached end-of-life July 31, 2025. Use github.com/godaddy/asherah/go/appencryption/plugins/aws-v2/kms instead.

func NewAWS deprecated

func NewAWS(crypto appencryption.AEAD, preferredRegion string, arnMap map[string]string) (*AWSKMS, error)

NewAWS returns a new AWSKMS used for encrypting/decrypting keys with a master key.

Deprecated: AWS SDK v1 reached end-of-life July 31, 2025. Use github.com/godaddy/asherah/go/appencryption/plugins/aws-v2/kms instead.

type AWSKMSClient deprecated

type AWSKMSClient = awsV1kms.AWSKMSClient

AWSKMSClient contains a KMS client and region information used for encrypting a key in KMS.

Deprecated: AWS SDK v1 reached end-of-life July 31, 2025. Use github.com/godaddy/asherah/go/appencryption/plugins/aws-v2/kms instead.

type KMS deprecated

type KMS = awsV1kms.KMS

KMS is implemented by the client in the kms package from the AWS SDK. We only use a subset of methods defined below.

Deprecated: AWS SDK v1 reached end-of-life July 31, 2025. Use github.com/godaddy/asherah/go/appencryption/plugins/aws-v2/kms instead.

type StaticKMS

type StaticKMS struct {
	Crypto appencryption.AEAD
	// contains filtered or unexported fields
}

StaticKMS is an in-memory static implementation of a KeyManagementService. NOTE: It should not be used in production and is for testing only!

func NewStatic

func NewStatic(key string, crypto appencryption.AEAD) (*StaticKMS, error)

NewStatic constructs a new StaticKMS. The provided key MUST be 32 bytes in length.

func (*StaticKMS) Close added in v0.1.5

func (s *StaticKMS) Close()

Close frees the memory locked by the static key. It should be called as soon as its no longer in use.

func (*StaticKMS) DecryptKey

func (s *StaticKMS) DecryptKey(ctx context.Context, encKey []byte) ([]byte, error)

DecryptKey decrypts the encrypted byte slice using the master key.

func (*StaticKMS) EncryptKey

func (s *StaticKMS) EncryptKey(_ context.Context, bytes []byte) ([]byte, error)

EncryptKey takes in an unencrypted byte slice and encrypts it with the master key. The returned value should then be inserted into the Metastore before being used.

Jump to

Keyboard shortcuts

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