From ae7beeca8435b4d0274ca9410012c1c774e14b8a Mon Sep 17 00:00:00 2001 From: Janusz Bialy Date: Sun, 24 Feb 2019 16:25:22 -0500 Subject: use gomplate implementation of base64 enc/dec --- aws/kms.go | 6 +++--- 1 file 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 } -- cgit v1.2.3