Relative Content

Tag Archive for node.jscwebassemblyemscriptenemcc

What is the entropy source for this C function when compiled to .wasm using emscripten?

static inline void ed25519_randombytes(unsigned char *x,unsigned long long xlen) { int i; if (ed25519_random_fd == -1) { for (;;) { ed25519_random_fd = open(“/dev/urandom”,O_RDONLY); if (ed25519_random_fd != -1) break; sleep(1); } } while (xlen > 0) { if (xlen < 1048576) i = xlen; else i = 1048576; i = read(ed25519_random_fd,x,i); if (i < 1) { […]