summaryrefslogtreecommitdiffstats
path: root/ppapi/shared_impl/crypto_impl.cc
diff options
context:
space:
mode:
authorqsr@google.com <qsr@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-05 08:46:11 +0000
committerqsr@google.com <qsr@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-05 08:46:11 +0000
commit51a018181c93b3c190146432805836155d69effa (patch)
treea9ed7d4a2acdbfad83f4c3063250ef283b15405b /ppapi/shared_impl/crypto_impl.cc
parent1817055ea2667eda23f5d53d623b3a547a7d19ee (diff)
downloadchromium_src-51a018181c93b3c190146432805836155d69effa.zip
chromium_src-51a018181c93b3c190146432805836155d69effa.tar.gz
chromium_src-51a018181c93b3c190146432805836155d69effa.tar.bz2
Move crypto_helpers from sync to crypto
crypto_helpers only depends on resources in base and is used by sync and password_manager. BUG= TEST= Review URL: http://codereview.chromium.org/6873156 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84223 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/shared_impl/crypto_impl.cc')
-rw-r--r--ppapi/shared_impl/crypto_impl.cc9
1 files changed, 1 insertions, 8 deletions
diff --git a/ppapi/shared_impl/crypto_impl.cc b/ppapi/shared_impl/crypto_impl.cc
index 6295bb2..f8e4aa2 100644
--- a/ppapi/shared_impl/crypto_impl.cc
+++ b/ppapi/shared_impl/crypto_impl.cc
@@ -11,14 +11,7 @@ namespace shared_impl {
// static
void CryptoImpl::GetRandomBytes(char* buffer, uint32_t num_bytes) {
- // Note: this is a copy of WebKitClientImpl::cryptographicallyRandomValues.
- uint64 bytes = 0;
- for (uint32_t i = 0; i < num_bytes; ++i) {
- uint32_t offset = i % sizeof(bytes);
- if (!offset)
- bytes = base::RandUint64();
- buffer[i] = reinterpret_cast<char*>(&bytes)[offset];
- }
+ base::RandBytes(buffer, num_bytes);
}
} // namespace shared_impl