Replies: 1 comment
-
I have found the problem in the js file generated of emscripten. The js file contains the following definition: The program calls the function at 594516 and fails with the error from above. However, if I change to the second definition, the call seems to work |
Beta Was this translation helpful? Give feedback.
-
I have a c++ framework which calls the libsodium function
randombytes_buf
. I want to port the framework using emscripten and compiled the library with./dist-build/emscripten.sh —sumo
. Then i compiled the framework and linked with -lsodium to libsodium.a.However when running the resulting file in the browser I always get the error
TypeError: Module.getRandomValue is not a function
. I have seen that several other ppl had the same issue, but couldn‘t figure out how they solved it. Tried also addingsodium_init()
, but didn‘t help. I have seen that there also exists libsodium.js, but couldn‘t figure out how to use it in C++.Beta Was this translation helpful? Give feedback.
All reactions