summaryrefslogtreecommitdiff
path: root/aws
diff options
context:
space:
mode:
Diffstat (limited to 'aws')
-rw-r--r--aws/kms.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/aws/kms.go b/aws/kms.go
index a560220b..d33d23a7 100644
--- a/aws/kms.go
+++ b/aws/kms.go
@@ -1,7 +1,7 @@
package aws
import (
- "encoding/base64"
+ b64 "github.com/hairyhenderson/gomplate/base64"
"github.com/aws/aws-sdk-go/service/kms"
)
@@ -30,13 +30,13 @@ func (k *KMS) Encrypt(keyID, plaintext string) (string, error) {
if err != nil {
return "", err
}
- ciphertext := base64.StdEncoding.EncodeToString(output.CiphertextBlob)
+ ciphertext, _ := b64.Encode(output.CiphertextBlob)
return ciphertext, nil
}
// Decrypt a base64 encoded cyphertext
func (k *KMS) Decrypt(ciphertext string) (string, error) {
- ciphertextBlob, err := base64.StdEncoding.DecodeString(ciphertext)
+ ciphertextBlob, err := b64.Decode(ciphertext)
if err != nil {
return "", err
}