Skip to content

Commit

Permalink
Adapt randombytes to our web port
Browse files Browse the repository at this point in the history
  • Loading branch information
geneotech committed Apr 22, 2024
1 parent 2b25565 commit 8abb337
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sodium/sodium_randombytes.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,17 @@ randombytes_implementation_name(void)
#endif
}

uint32_t
randombytes_external(void);

uint32_t
randombytes_random(void)
{
#ifndef __EMSCRIPTEN__
randombytes_init_if_needed();
return implementation->random();
#else
return 0;
return randombytes_external();
#endif
}

Expand Down

0 comments on commit 8abb337

Please sign in to comment.