Uncaught __dir__
while trying to generate a SubtleCrypto.generateKey()
#2462
Answered
by
BobSquarePants
BobSquarePants
asked this question in
Q&A
-
Hi, in my brython file II've tried the following def successCallback(result):
print('so far so good')
window.crypto.subtle.generateKey(
{'name':'ECDSA','namedCurve':'P-256'},
True,
["encrypt", "decrypt"]).then(successCallback) But I got, in the DOM console
Any ideas ? info: https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/generateKey Thanks Brython: 3.11.2 |
Beta Was this translation helpful? Give feedback.
Answered by
BobSquarePants
Jul 2, 2024
Replies: 1 comment 1 reply
-
I've updated my code with a and I got
an on MDN we can read:
and I make obviously my test in local so in HTTP. so no access to TBC |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I confirm, the error was happening because SubtleCrypto is only available in HTTPS...
Anyway, making some test with the method of
SubtleCrypto
it make me almost puke... They have made it complex for no reason ! (when I compare the same function in 🐍 Python, damn it so much easier, readable, make sense !)