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

Unified Diff: components/variations/entropy_provider.h

Issue 2503683005: Making the SHA1 entropy provider use the randomization_seed. (Closed)
Patch Set: Updating comments Created 4 years, 1 month 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 | components/variations/entropy_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/variations/entropy_provider.h
diff --git a/components/variations/entropy_provider.h b/components/variations/entropy_provider.h
index 27e73eb3564e41ee5c6234c39dadb9b49673eea6..41276019bf146bfefbc3b48344fee357cad1ef51 100644
--- a/components/variations/entropy_provider.h
+++ b/components/variations/entropy_provider.h
@@ -41,10 +41,10 @@ void PermuteMappingUsingRandomizationSeed(uint32_t randomization_seed,
} // namespace internal
-// SHA1EntropyProvider is an entropy provider suitable for high entropy
-// sources. It works by taking the first 64 bits of the SHA1 hash of the
-// entropy source concatenated with the trial name and using that for the
-// final entropy value.
+// SHA1EntropyProvider is an entropy provider suitable for high entropy sources.
+// It works by taking the first 64 bits of the SHA1 hash of the entropy source
+// concatenated with the trial name, or randomization seed and using that for
+// the final entropy value.
class SHA1EntropyProvider : public base::FieldTrial::EntropyProvider {
public:
// Creates a SHA1EntropyProvider with the given |entropy_source|, which
@@ -64,10 +64,10 @@ class SHA1EntropyProvider : public base::FieldTrial::EntropyProvider {
};
// PermutedEntropyProvider is an entropy provider suitable for low entropy
-// sources (below 16 bits). It uses the field trial name to generate a
-// permutation of a mapping array from an initial entropy value to a new value.
-// Note: This provider's performance is O(2^n), where n is the number of bits
-// in the entropy source.
+// sources (below 16 bits). It uses the field trial name or randomization seed
+// to generate a permutation of a mapping array from an initial entropy value to
+// a new value. Note: This provider's performance is O(2^n), where n is the
+// number of bits in the entropy source.
class PermutedEntropyProvider : public base::FieldTrial::EntropyProvider {
public:
// Creates a PermutedEntropyProvider with the given |low_entropy_source|,
« no previous file with comments | « no previous file | components/variations/entropy_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698