Changeset 80407 in webkit
- Timestamp:
- Mar 4, 2011 10:02:45 PM (13 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r80397 r80407 1 2011-03-04 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com> 2 3 Reviewed by Laszlo Gombos. 4 5 [Qt] Need symbian version of cryptographicallyRandomValuesFromOS 6 https://bugs.webkit.org/show_bug.cgi?id=55782 7 8 Implement Symbian version of cryptographicallyRandomValuesFromOS 9 10 * wtf/OSRandomSource.cpp: 11 (WTF::cryptographicallyRandomValuesFromOS): 12 1 13 2011-03-04 Gavin Barraclough <barraclough@apple.com> 2 14 -
trunk/Source/JavaScriptCore/wtf/OSRandomSource.cpp
r78421 r80407 30 30 #include <stdlib.h> 31 31 32 #if OS(SYMBIAN) 33 #include <e32math.h> 34 #endif 35 32 36 #if OS(UNIX) 33 37 #include <fcntl.h> … … 45 49 void cryptographicallyRandomValuesFromOS(unsigned char* buffer, size_t length) 46 50 { 47 #if OS(UNIX) 51 #if OS(SYMBIAN) 52 TInt random; 53 while (length > sizeof(random)) { 54 random = Math::Random(); 55 memcpy(buffer, &random, sizeof(random)); 56 length -= sizeof(random); 57 buffer += sizeof(random); 58 } 59 if (length > 0) { 60 random = Math::Random(); 61 memcpy(buffer, &random, length); 62 } 63 #elif OS(UNIX) 48 64 int fd = open("/dev/urandom", O_RDONLY, 0); 49 65 if (fd < 0)
Note: See TracChangeset
for help on using the changeset viewer.