This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-08-30
Channels
- # aleph (15)
- # announcements (4)
- # aws (2)
- # bangalore-clj (7)
- # beginners (236)
- # calva (24)
- # cider (11)
- # cljs-dev (63)
- # clojure (141)
- # clojure-europe (3)
- # clojure-india (2)
- # clojure-italy (8)
- # clojure-nl (3)
- # clojure-spec (8)
- # clojure-uk (52)
- # clojured (1)
- # clojuredesign-podcast (4)
- # clojurescript (35)
- # clojutre (3)
- # community-development (1)
- # cursive (77)
- # data-science (1)
- # datomic (3)
- # emacs (13)
- # fulcro (7)
- # graalvm (78)
- # graphql (2)
- # nrepl (7)
- # off-topic (18)
- # pathom (25)
- # reagent (12)
- # reitit (31)
- # shadow-cljs (178)
- # spacemacs (7)
- # tools-deps (32)
- # xtdb (10)
- # yada (3)
Has anyone worked with the AWS KMS API and Cognitect's aws-api? I'm having trouble reading the :Plaintext
key from the response.
(let [r (aws-api/invoke c {:op :GenerateDataKey
:request {:KeyId cmk-arn
:KeySpec "AES_256"}})
plaintext (:Plaintext r)]
(with-open [p plaintext
out (io/output-stream "test.txt")]
(clojure.data.codec.base64/decoding-transfer p out)))
java.lang.ArrayIndexOutOfBoundsException: Index -7 out of bounds for length 123
The AWS docs say Plaintext
is a "Base64-encoded binary data object." If I slurp
plaintext
, I get "�$���r*�!��8yS�x;�\f�@\r�bn@�"
returned which is definitely not base64. Is aws-api doing something with the response before I get it?