diff options
| author | Janusz Bialy <janusz.bialy@qlik.com> | 2019-02-24 16:25:22 -0500 |
|---|---|---|
| committer | Janusz Bialy <janusz.bialy@qlik.com> | 2019-03-23 15:04:21 -0400 |
| commit | ae7beeca8435b4d0274ca9410012c1c774e14b8a (patch) | |
| tree | 2190661c3ebe5c2f61b3f0279d945bb17477fb35 | |
| parent | fc282fc8777c20dc3ec9cc475b18c40b6d10e8b4 (diff) | |
use gomplate implementation of base64 enc/dec
| -rw-r--r-- | aws/kms.go | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 } |
