kms

package
v0.0.0-...-25c641e Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewKmsEncryptedPrivateKeyProvider

func NewKmsEncryptedPrivateKeyProvider(svc *kms.Client, kmsKeyId string, encryptedKey string, chainId *big.Int) (key.Provider, error)

NewKmsEncryptedPrivateKeyProvider is a utility method to easily create a transaction signer from a kms encrypted private key for the given chainID.

Types

type Decrypter

type Decrypter interface {
	// Decrypt decrypts ciphertext that was encrypted by a KMS key using RSAES_OAEP_SHA_256 algorithm
	Decrypt(ctx context.Context, data string) (string, error)
	// Encrypt encrypts plaintext with a KMS key using RSAES_OAEP_SHA_256 algorithm
	Encrypt(ctx context.Context, data string) (string, error)
}

Decrypter defines methods used to encrypt and decrypt text with a KMS key

func NewKmsDecrypter

func NewKmsDecrypter(svc *kms.Client, keyId string) Decrypter

Jump to

Keyboard shortcuts

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