From 8beae1725318fea9376a8f0bd51d21be211ec4da Mon Sep 17 00:00:00 2001 From: James Robson Date: Mon, 22 Jun 2015 13:11:33 -0500 Subject: [PATCH] revert original hack --- src/libsodium/randombytes/randombytes.c | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/src/libsodium/randombytes/randombytes.c b/src/libsodium/randombytes/randombytes.c index f7ce0a94..53a7a2fc 100644 --- a/src/libsodium/randombytes/randombytes.c +++ b/src/libsodium/randombytes/randombytes.c @@ -9,12 +9,6 @@ # include #endif - -#ifdef __native_client__ -#include -#include -#endif - #include "randombytes.h" #include "randombytes_sysrandom.h" @@ -120,24 +114,9 @@ void randombytes_buf(void * const buf, const size_t size) { #ifndef __EMSCRIPTEN__ -#ifdef __native_client__ - size_t n = 0; - struct nacl_irt_random rand_intf; - - if (nacl_interface_query(NACL_IRT_RANDOM_v0_1, - &rand_intf, sizeof(rand_intf)) != sizeof(rand_intf)) abort(); - - while (n < size) { - size_t nread; - if (rand_intf.get_random_bytes( - (unsigned char *)buf+n, size-n, &nread) != 0) abort(); - n += nread; - } -#else if (size > (size_t) 0U) { implementation->buf(buf, size); } -#endif #else unsigned char *p = buf; size_t i;