aws

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2018 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrKmsMissing - this is the custom error, returned when name, alias or arn is missing
	ErrKmsMissing = errors.New("kms is empty or missing")
	// ErrRegionMissing - this is the custom error, returned when the region is missing
	ErrRegionMissing = errors.New("region is empty or missing")
)

Functions

This section is empty.

Types

type AmazonKMS

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

AmazonKMS struct represents AWS Key Management Service

func NewAmazonKMS

func NewAmazonKMS(key, region string) *AmazonKMS

NewAmazonKMS creates AWS KMS

func (*AmazonKMS) Decrypt

func (a *AmazonKMS) Decrypt(ciphertext []byte) ([]byte, error)

Decrypt is responsible for decrypting ciphertext and returning plaintext in bytes using AWS KMS. See Crypt.DecryptFile

func (*AmazonKMS) Encrypt

func (a *AmazonKMS) Encrypt(plaintext []byte) ([]byte, error)

Encrypt is responsible for encrypting plaintext and returning ciphertext in bytes using AWS KMS. See Crypt.EncryptFile

Jump to

Keyboard shortcuts

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