summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-30 01:06:38 +0000
committerericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-30 01:06:38 +0000
commit7794ec00dd9e3b03fe5c261d993ade85a93b47ec (patch)
tree32833ae9028f7464bfa65a935c4f459d5a0526fa
parent771d0c2bc9b3b8a33b4de10997efcbb8097451ab (diff)
downloadchromium_src-7794ec00dd9e3b03fe5c261d993ade85a93b47ec.zip
chromium_src-7794ec00dd9e3b03fe5c261d993ade85a93b47ec.tar.gz
chromium_src-7794ec00dd9e3b03fe5c261d993ade85a93b47ec.tar.bz2
Use base::RandInt() in place of rand(), now that rand_util has been moved from chrome/ to base/.
Review URL: http://codereview.chromium.org/5036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2707 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--net/http/http_auth_handler_digest.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/http/http_auth_handler_digest.cc b/net/http/http_auth_handler_digest.cc
index e665a0b..7f351b4 100644
--- a/net/http/http_auth_handler_digest.cc
+++ b/net/http/http_auth_handler_digest.cc
@@ -5,6 +5,7 @@
#include "net/http/http_auth_handler_digest.h"
#include "base/md5.h"
+#include "base/rand_util.h"
#include "base/string_util.h"
#include "net/base/net_util.h"
#include "net/http/http_auth.h"
@@ -47,9 +48,8 @@ std::string HttpAuthHandlerDigest::GenerateNonce() {
static const char domain[] = "0123456789abcdef";
std::string cnonce;
cnonce.reserve(16);
- // TODO(eroman): use rand_util::RandIntSecure()
for (int i = 0; i < 16; ++i)
- cnonce.push_back(domain[rand() % 16]);
+ cnonce.push_back(domain[base::RandInt(0, 15)]);
return cnonce;
}