This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-09-30
Channels
- # announcements (31)
- # aws (17)
- # babashka (26)
- # babashka-sci-dev (8)
- # beginners (16)
- # biff (1)
- # calva (9)
- # cider (5)
- # clj-kondo (3)
- # clj-on-windows (38)
- # cljdoc (2)
- # cljs-dev (9)
- # cljsrn (6)
- # clojure (58)
- # clojure-europe (47)
- # clojure-nl (3)
- # clojure-norway (21)
- # clojure-uk (2)
- # clojurescript (25)
- # conjure (2)
- # data-science (7)
- # datomic (3)
- # emacs (12)
- # events (5)
- # fulcro (5)
- # honeysql (10)
- # introduce-yourself (7)
- # lsp (4)
- # meander (3)
- # nbb (18)
- # off-topic (28)
- # rdf (1)
- # releases (2)
- # sci (5)
- # shadow-cljs (23)
- # sql (5)
- # test-check (3)
(defn ->encryption-key
[]
(js/crypto.subtle.generateKey
(clj->js {:name "RSA-OAEP"
:modulusLength 4096
:publicExponent (js/Uint8Array. [1 0 1])
:hash "SHA-384"})
extractable?
["encrypt" "decrypt"]))
(defn ->encryption-key
[]
(js/crypto.subtle.generateKey
(clj->js {:name "RSA-OAEP"
:modulusLength 4096
:publicExponent (js/Uint8Array. [1 0 1])
:hash "SHA-384"})
extractable?
(clj->js ["encrypt" "decrypt"]))) ; <-- extra clj-js needed
I don't know. What is the type that the last argument of generateKey
accepts? And what does CLJS pass and how is that differently than what nbb passes? It's not obvious to me
Perhaps you can print the type of that thing. If the types are equal, the "bug" may be somewhere else
it could be different environments. Node.js implements an assertion in crypto.subtle.generateKey
that checks whether the keyUsage
argument is in fact an array