Index: include/v8.h |
=================================================================== |
--- include/v8.h (revision 8657) |
+++ include/v8.h (working copy) |
@@ -2801,7 +2801,14 @@ |
char** raw_data; |
}; |
+ |
/** |
+ * EntropySource is used as a callback function when v8 needs a source |
+ * of cryptographically safe entropy. |
Mads Ager (chromium)
2011/07/17 08:59:12
Let's remove the "cryptographically safe" part of
|
+ */ |
+typedef bool (*EntropySource)(unsigned char* buffer, size_t length); |
+ |
+/** |
* Container class for static utility functions. |
*/ |
class V8EXPORT V8 { |
@@ -3026,6 +3033,12 @@ |
static bool Initialize(); |
/** |
+ * Allows the host application to provide a callback which can be used |
+ * as a source of entropy for random number generators. |
+ */ |
+ static void SetEntropySource(EntropySource source); |
+ |
+ /** |
* Adjusts the amount of registered external memory. Used to give |
* V8 an indication of the amount of externally allocated memory |
* that is kept alive by JavaScript objects. V8 uses this to decide |