summaryrefslogtreecommitdiffstats
path: root/base/rand_util_nacl.cc
Commit message (Collapse)AuthorAgeFilesLines
* Switch to standard integer types in base/.avi2015-12-261-3/+4
| | | | | | | | | | BUG=138542 TBR=mark@chromium.org NOPRESUBMIT=true Review URL: https://codereview.chromium.org/1538743002 Cr-Commit-Position: refs/heads/master@{#366910}
* Stop using the nacl_secure_random_init() which is deprecated.penghuang@chromium.org2014-06-201-1/+0
| | | | | | | | BUG=https://code.google.com/p/nativeclient/issues/detail?id=3881 Review URL: https://codereview.chromium.org/345733007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278609 0039d316-1c4b-4281-b951-d872f2087c98
* Use nacl_secure_random() in rand_util_nacl.ccpenghuang@chromium.org2014-06-171-30/+15
| | | | | | | | | | The rand_util_nacl.cc will be used inside the IRT and outside the IRT. So we need to use nacl_secure_random() which will work for both. BUG=nativeclient:3881 Review URL: https://codereview.chromium.org/334353004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277853 0039d316-1c4b-4281-b951-d872f2087c98
* Improve base::RandBytes() performance by 1.75x-2.10x on POSIX.dalecurtis@chromium.org2014-01-231-9/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No real changes, just avoids doling out Uint64 sized chunks by using the underlying method to hand out correctly sized blocks. Windows is the only platform which doesn't have a byte stream based generator, so I've moved the generic RandBytes() method there and added native methods for other platforms which reuse each platforms internal generator. Performance measured by the new benchmark test over 5 runs, each representing 10 generations of 1mb of random data: Linux x64: Original: 1199625.4 Modified: 686480.2 Improvement: 1.75x On OSX (10.9.1): Original: 1532669.8 Modified: 734808.0 Improvement: 2.10x BUG=none TEST=new benchmark unittest. Review URL: https://codereview.chromium.org/140773006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@246486 0039d316-1c4b-4281-b951-d872f2087c98
* Enable parts of base_untrusted that are used by remoting clientsergeyu@chromium.org2012-07-261-0/+53
| | | | | | | | | | | | | | 1. base64, rand_util, threading, time and threads were previosly disabled in base_untrusted. Remoting code depends on these parts of base, so they need to be enabled. 2. Implemented NaCl version of rand_util. 3. Enabled glibc version of base_untrusted BUG=134216 Review URL: https://chromiumcodereview.appspot.com/10795083 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148641 0039d316-1c4b-4281-b951-d872f2087c98
* Add untrusted NaCl build for PPAPI proxy.bbudge@chromium.org2012-06-161-53/+0
| | | | | | | | | | This patch refactors ppapi_shared.gypi and ppapi_proxy.gypi into proper includes, adds ppapi_shared_untrusted and ppapi_proxy_untrusted .gyp files, and integrates them into the nacl_irt build (ppapi/native_client/native_client.gyp). In order to build without link errors, it includes our plugin side initialization of PluginDispatcher, and a PpapiPluginMain definition. When the 'build_ppapi_ipc_proxy_untrusted' gyp flag is set to '1', this will build a working NaCl IRT using the Chrome IPC proxy. BUG=116317 TEST=compiles, runs HelloWorld and GetURL SDK examples. Review URL: https://chromiumcodereview.appspot.com/10565015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142540 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 142482 - Add untrusted NaCl build for PPAPI proxy.bbudge@chromium.org2012-06-151-0/+53
| | | | | | | | | | | | | This patch refactors ppapi_shared.gypi and ppapi_proxy.gypi into proper includes, adds ppapi_shared_untrusted and ppapi_proxy_untrusted .gyp files, and integrates them into the nacl_irt build (ppapi/native_client/native_client.gyp). In order to build without link errors, it includes our plugin side initialization of PluginDispatcher, and a PpapiPluginMain definition. When the 'build_ppapi_ipc_proxy_untrusted' gyp flag is set to '1', this will build a working NaCl IRT using the Chrome IPC proxy. BUG=116317 TEST=compiles, runs HelloWorld and GetURL SDK examples. Review URL: https://chromiumcodereview.appspot.com/10546140 TBR=bbudge@chromium.org Review URL: https://chromiumcodereview.appspot.com/10565012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142494 0039d316-1c4b-4281-b951-d872f2087c98
* Add untrusted NaCl build for PPAPI proxy.bbudge@chromium.org2012-06-151-53/+0
| | | | | | | | | | This patch refactors ppapi_shared.gypi and ppapi_proxy.gypi into proper includes, adds ppapi_shared_untrusted and ppapi_proxy_untrusted .gyp files, and integrates them into the nacl_irt build (ppapi/native_client/native_client.gyp). In order to build without link errors, it includes our plugin side initialization of PluginDispatcher, and a PpapiPluginMain definition. When the 'build_ppapi_ipc_proxy_untrusted' gyp flag is set to '1', this will build a working NaCl IRT using the Chrome IPC proxy. BUG=116317 TEST=compiles, runs HelloWorld and GetURL SDK examples. Review URL: https://chromiumcodereview.appspot.com/10546140 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142482 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: Remove the C version of GetUrandomFD()mseaborn@chromium.org2012-05-301-1/+0
| | | | | | | | | | | | | | | | | | | I originally added this in a #includable-from-C header so that it could be #included from NaCl-side code. However, having NaCl #include Chromium headers is not a clean interface, and this has since been replaced by runtime dependency injection. We move the function to a C++ header and put it into a namespace. Also fix the error return value for UrandomFD() so that it can't be confused with stdin. BUG=http://code.google.com/p/nativeclient/issues/detail?id=2655 TEST=build Review URL: https://chromiumcodereview.appspot.com/10446043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139537 0039d316-1c4b-4281-b951-d872f2087c98
* Make base::Logging compile with the NaCl toolchain.bbudge@chromium.org2012-02-281-0/+54
BUG=none TEST=none Review URL: http://codereview.chromium.org/9474034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124025 0039d316-1c4b-4281-b951-d872f2087c98