Skip to content

Commit

Permalink
Merge pull request #132 from lotharschulz/patch-3
Browse files Browse the repository at this point in the history
base64 -d mac osx workaround
  • Loading branch information
mikkeloscar committed Dec 13, 2017
2 parents e95b6fb + 573f4c0 commit b677613
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions user-guide/key-encryption.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ Let's test if all works:
.. code-block:: bash
# 1. Encrypt and save the binary content to a file:
$ aws kms encrypt --key-id $KMS_KEY_ID --plaintext "<here-you-can-paste-your-pwd>" --query CiphertextBlob --output text | base64 -d > /tmp/encrypted
$ aws kms encrypt --key-id $KMS_KEY_ID --plaintext "<here-you-can-paste-your-pwd>" --query CiphertextBlob --output text | base64 --decode > /tmp/encrypted
.. code-block:: bash
# 2. Then feed this encrypted content back to decrypt. Note that the Plaintext that comes back is base64 encoded so we need to decode this.
$ echo "Decrypted is: $(aws kms decrypt --ciphertext-blob fileb:///tmp/encrypted --output text --query Plaintext | base64 -d)"
$ echo "Decrypted is: $(aws kms decrypt --ciphertext-blob fileb:///tmp/encrypted --output text --query Plaintext | base64 --decode)"
If all works we can now repeat the first step without the base64 encoding:

Expand Down

0 comments on commit b677613

Please sign in to comment.