I'm just getting myself setup with the AWS Key Management Service and am calling the method generateDataKey
. The method is working and returning the CiphertextBlob and the Plaintext blob.
However, the blobs are formatted something like:
�g�'��w�i�<��a*\B4p 1IG
I'm using the API so, according to the docs, it is not encoded. I'm trying to understand if the Plaintext can somehow be "decoded" in PHP so I can store it / use it without all the odd looking ASCII characters. What I was expecting was a long string of characters and not the special characters above. I feel like I'm missing something simple.
Thank you!
The answer is a binary blob. These will need to be base64 encoded so that you'll get the expected result.
Sample code follows: