jedisct1 / libsodium

A modern, portable, easy to use crypto library.
https://libsodium.org
Other
12.18k stars 1.73k forks source link

Emscripten libsodium as a library #952

Closed DiachenkoIgor closed 4 years ago

DiachenkoIgor commented 4 years ago

Thank you, for your library, but i have issue with emscripten compiler. I have simple application, that used your library. I have compiled libsodium to libsodium.bc file based on libsodium/dist-build/emscripten.sh script and add this file as library for my own application. But when my application starts it throws error "Module.getRandomValue() is not a function". I noticed, that you create custom libsodium.js file by merging asm and wasm file. Can you please provide decision for this or algorithm, how use your library in such situation?

jedisct1 commented 4 years ago

Take a look at libsodium.js.