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

Unified Diff: webrtc/base/helpers.h

Issue 2115793003: Check that table evenly divides 256 when generating random string. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebased Created 4 years, 4 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
« no previous file with comments | « no previous file | webrtc/base/helpers.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/helpers.h
diff --git a/webrtc/base/helpers.h b/webrtc/base/helpers.h
index c75dba59854184c0e9ed7cfd0d38a631610c3f90..11e5e87432b8fa133de02f3e8992fadd79b95d6f 100644
--- a/webrtc/base/helpers.h
+++ b/webrtc/base/helpers.h
@@ -36,6 +36,8 @@ bool CreateRandomString(size_t length, std::string* str);
// Generates a (cryptographically) random string of the given length,
// with characters from the given table. Return false if the random
// number generator failed.
+// For ease of implementation, the function requires that the table
+// size evenly divide 256; otherwise, it returns false.
bool CreateRandomString(size_t length, const std::string& table,
std::string* str);
« no previous file with comments | « no previous file | webrtc/base/helpers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698