Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(414)

Unified Diff: Source/wtf/CryptographicallyRandomNumber.h

Issue 16820007: Expose crypto.getRandomValues() to workers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/wtf/CryptographicallyRandomNumber.h
diff --git a/Source/wtf/CryptographicallyRandomNumber.h b/Source/wtf/CryptographicallyRandomNumber.h
index 53eb5c9846c6dc15b5f9358033c6d29109c0fa6f..00a8717bd65d70b2fed9efd754daf1239db22a27 100644
--- a/Source/wtf/CryptographicallyRandomNumber.h
+++ b/Source/wtf/CryptographicallyRandomNumber.h
@@ -34,8 +34,10 @@ namespace WTF {
typedef void (*RandomNumberSource)(unsigned char*, size_t);
+// The RandomNumberSource function MUST be threadsafe.
WTF_EXPORT void setRandomSource(RandomNumberSource);
+// These functions are threadsafe.
WTF_EXPORT uint32_t cryptographicallyRandomNumber();
WTF_EXPORT void cryptographicallyRandomValues(void* buffer, size_t length);
« Source/bindings/v8/custom/V8CryptoCustom.cpp ('K') | « Source/modules/modules.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698