customkms

package
v0.0.0-...-651c771 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecryptKey

func DecryptKey(ctx context.Context, api KMSApi, keyId string, encrypted string) ([]byte, error)

func EncryptKey

func EncryptKey(ctx context.Context, api KMSApi, keyId string, source []byte, target string) error

func GetPublicKey

func GetPublicKey(ctx context.Context, api KMSApi, keyID string) ([]byte, error)

func ReEncryptKey

func ReEncryptKey(ctx context.Context, api KMSApi, data []byte, sourceKeyAlias string, destKeyAlias string, target string) error

Types

type KMSApi

type KMSApi interface {
	GetPublicKey(ctx context.Context, params *kms.GetPublicKeyInput, optFns ...func(*kms.Options)) (*kms.GetPublicKeyOutput, error)

	Encrypt(ctx context.Context, params *kms.EncryptInput, optFns ...func(*kms.Options)) (*kms.EncryptOutput, error)

	Decrypt(ctx context.Context, params *kms.DecryptInput, optFns ...func(*kms.Options)) (*kms.DecryptOutput, error)

	ReEncrypt(ctx context.Context, params *kms.ReEncryptInput, optFns ...func(*kms.Options)) (*kms.ReEncryptOutput, error)
}

Jump to

Keyboard shortcuts

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