Replies: 6 comments
-
Hey 👋 Probably this means that Sets are not supported. |
Beta Was this translation helpful? Give feedback.
-
Thank you. You're right. With your help one error went away but a new one appeared: "ReferenceError: Can't find variable: navigator". |
Beta Was this translation helpful? Give feedback.
-
It's probably possible, but for streaming encryption and decryption, you probably also want to have access to disk and/or the network in JS, so that you don't have to copy each chunk to the host language while streaming? So I would again recommend looking into the mobile Node.js solutions. |
Beta Was this translation helpful? Give feedback.
-
Yes. This is complex task and with Node.js it’s probably easier to do solution. But still how I can build openpgp.js with crypto module inside because VM JavaScriptCore does not have a built-in like Node.js or web-browser? |
Beta Was this translation helpful? Give feedback.
-
For the example I gave (getting cryptographically random bytes) this is likely not possible without some type of communication with the host. There is no way for a module in JS to come up with secure random bytes by itself. So you will have to polyfill |
Beta Was this translation helpful? Give feedback.
-
We use JavaScriptCore on iOS happily. It works, but you have to do quite a bit of the low-level crypto yourself, because else it either wouldn't work or be painfully slow. |
Beta Was this translation helpful? Give feedback.
-
Hi guys,
And I'm trying to use openpgp.min.js from dist folder with JavaScriptCore in iOS app (swift).
But there is such error when trying to open this file under VM JavaScriptCore.
"TypeError: undefined is not a constructor (evaluating 'new t.Set([a.default.hash.md5,a.default.hash.ripemd])')"
Does anybody know why it happens? And how it can be fixed?
Thanks a lot
Beta Was this translation helpful? Give feedback.
All reactions