Index: src/shared/platform/nacl_global_secure_random.c |
diff --git a/src/shared/platform/nacl_global_secure_random.c b/src/shared/platform/nacl_global_secure_random.c |
index d09ccac2db1ebfcda5ce9974dcce1825493f4b76..7892416b2ef91ef319a7a3195080280f12bb954c 100644 |
--- a/src/shared/platform/nacl_global_secure_random.c |
+++ b/src/shared/platform/nacl_global_secure_random.c |
@@ -55,6 +55,12 @@ uint32_t NaClGlobalSecureRngUint32(void) { |
return rv; |
} |
+void NaClGlobalSecureRngGenerateBytes(uint8_t *buf, size_t buf_size) { |
+ NaClXMutexLock(&nacl_global_rng_mu); |
+ (*nacl_grngp->base.vtbl->GenBytes)(&nacl_grngp->base, buf, buf_size); |
+ NaClXMutexUnlock(&nacl_global_rng_mu); |
+} |
+ |
void NaClGenerateRandomPath(char *path, int length) { |
/* |
* This function is used for generating random paths and names, |