# README
aws-sdk-go-v2-wrapper | KMS
Quick Usage
import (
"context"
"github.com/evalphobia/aws-sdk-go-v2-wrapper/config"
"github.com/evalphobia/aws-sdk-go-v2-wrapper/kms"
)
func main() {
svc, err := kms.New(config.Config{
AccessKey: "<...>",
SecretKey: "<...>",
})
if err != nil {
panic(err)
}
ctx := context.Background()
base64Text, err := svc.XEncryptString(ctx, "alias/my-key", "I love you!")
if err != nil {
panic(err)
}
plainText, err := svc.XDecryptString(ctx, base64Text)
if err != nil {
panic(err)
}
if plainText != "I love you!" {
panic("'plainText' should be 'I love you!'")
}
// ...
}
X API
Name | Description |
---|---|
XDeleteKey | deletes the key using 'ScheduleKeyDeletion'. |
XEncryptBytes | encrypts the 'plainData' using the 'key' and returns 'encryptedData'. |
XEncryptString | encrypts the 'plainText' using the 'key' and returns encrypted 'base64Text'. |
XDecryptBytes | decrypts the 'encryptedData'. |
XDecryptString | decrypts the 'base64Text'. |
XReEncryptBytes | re-encrypts the 'encryptedData' using 'destinationKey'. |
XReEncryptString | re-encrypts the 'base64Text' using 'destinationKey'. |
# Functions
New returns initialized *KMS.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
CreateAliasRequest has parameters for `CreateAlias` operation.
CreateKeyRequest has parameters for `CreateKey` operation.
No description provided by the author
DecryptRequest has parameters for `Decrypt` operation.
No description provided by the author
DescribeKeyRequest has parameters for `DescribeKey` operation.
No description provided by the author
EncryptRequest has parameters for `Encrypt` operation.
No description provided by the author
No description provided by the author
KMS has KMS client.
ReEncryptRequest has parameters for `ReEncrypt` operation.
No description provided by the author
ScheduleKeyDeletionRequest has parameters for `ScheduleKeyDeletion` operation.
No description provided by the author
No description provided by the author
# Type aliases
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author