aws

package
v1.5.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateKmsSigner

func CreateKmsSigner(uri string) (signature.Signer, error)

CreateKmsSigner creates a signer instance from a KMS ARN

func CreateKmsVerifier added in v1.5.0

func CreateKmsVerifier(uri string) (signature.Verifier, error)

CreateKmsVerifier creates a verifier instance from a KMS ARN

func NewKMSClient added in v1.5.6

func NewKMSClient(ctx context.Context) (*kms.Client, error)

newKMSClient generates a new KMS Client instance with default config

Types

type KMSCryptoClient added in v1.5.0

type KMSCryptoClient struct {
	KeyID string
	// contains filtered or unexported fields
}

KMSCryptoClient is the container for the KMS Key

func (*KMSCryptoClient) CanEncrypt added in v1.5.0

func (enc *KMSCryptoClient) CanEncrypt() bool

CanEncrypt provides a bool if the key is able to en-/decrypt

func (*KMSCryptoClient) KeySize added in v1.5.0

func (enc *KMSCryptoClient) KeySize() int

KeySize returns the key length in bytes

type KMSDecrypter added in v1.5.0

type KMSDecrypter struct {
	KMSCryptoClient
}

KMSDecrypter implements the Decrypter interface with KMS

func NewKMSDecrypter added in v1.5.0

func NewKMSDecrypter(keyID string) (*KMSDecrypter, error)

NewKMSDecrypter generates a new KMSDecrypter instance

func (*KMSDecrypter) DecryptMessage added in v1.5.0

func (dec *KMSDecrypter) DecryptMessage(message []byte) ([]byte, error)

DecryptMessage decrypts a message using the KMS API

type KMSEncrypter added in v1.5.0

type KMSEncrypter struct {
	KMSCryptoClient
}

KMSEncrypter implements the Encrypter interface with KMS

func NewKMSEncrypter added in v1.5.0

func NewKMSEncrypter(keyID string) (*KMSEncrypter, error)

NewKMSEncrypter generatea a new KMSEncrypter instance

func (*KMSEncrypter) EncryptMessage added in v1.5.0

func (enc *KMSEncrypter) EncryptMessage(message []byte) ([]byte, error)

EncryptMessage using the KMS API

Jump to

Keyboard shortcuts

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