summaryrefslogtreecommitdiff
path: root/aws
diff options
context:
space:
mode:
authorJanusz Bialy <janusz.bialy@qlik.com>2019-02-24 16:25:22 -0500
committerJanusz Bialy <janusz.bialy@qlik.com>2019-03-23 15:04:21 -0400
commitae7beeca8435b4d0274ca9410012c1c774e14b8a (patch)
tree2190661c3ebe5c2f61b3f0279d945bb17477fb35 /aws
parentfc282fc8777c20dc3ec9cc475b18c40b6d10e8b4 (diff)
use gomplate implementation of base64 enc/dec
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
}