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

Side by Side Diff: components/rappor/byte_vector_utils.h

Issue 614573002: Fix some minor typos: psuedo -> pseudo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « components/dom_distiller/core/css/distilledpage.css ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_RAPPOR_BYTE_VECTOR_UTILS_H_ 5 #ifndef COMPONENTS_RAPPOR_BYTE_VECTOR_UTILS_H_
6 #define COMPONENTS_RAPPOR_BYTE_VECTOR_UTILS_H_ 6 #define COMPONENTS_RAPPOR_BYTE_VECTOR_UTILS_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 // Generates a random vector of bytes from a uniform distribution. 56 // Generates a random vector of bytes from a uniform distribution.
57 virtual ByteVector GetRandomByteVector(); 57 virtual ByteVector GetRandomByteVector();
58 58
59 private: 59 private:
60 size_t byte_count_; 60 size_t byte_count_;
61 61
62 DISALLOW_COPY_AND_ASSIGN(ByteVectorGenerator); 62 DISALLOW_COPY_AND_ASSIGN(ByteVectorGenerator);
63 }; 63 };
64 64
65 // A ByteVectorGenerator that uses a psuedo-random function to generate a 65 // A ByteVectorGenerator that uses a pseudo-random function to generate a
66 // deterministically random bits. This class only implements a single request 66 // deterministically random bits. This class only implements a single request
67 // from HMAC_DRBG and streams up to 2^19 bits from that request. 67 // from HMAC_DRBG and streams up to 2^19 bits from that request.
68 // Ref: http://csrc.nist.gov/publications/nistpubs/800-90A/SP800-90A.pdf 68 // Ref: http://csrc.nist.gov/publications/nistpubs/800-90A/SP800-90A.pdf
69 // We're using our own PRNG instead of crypto::RandBytes because we need to 69 // We're using our own PRNG instead of crypto::RandBytes because we need to
70 // generate a repeatable sequence of bits from the same seed. Conservatively, 70 // generate a repeatable sequence of bits from the same seed. Conservatively,
71 // we're choosing to use HMAC_DRBG here, as it is one of the best studied 71 // we're choosing to use HMAC_DRBG here, as it is one of the best studied
72 // and standardized ways of generating deterministic, unpredictable sequences 72 // and standardized ways of generating deterministic, unpredictable sequences
73 // based on a secret seed. 73 // based on a secret seed.
74 class HmacByteVectorGenerator : public ByteVectorGenerator { 74 class HmacByteVectorGenerator : public ByteVectorGenerator {
75 public: 75 public:
(...skipping 30 matching lines...) Expand all
106 106
107 // Total number of bytes streamed from the HMAC_DRBG Generate Process. 107 // Total number of bytes streamed from the HMAC_DRBG Generate Process.
108 size_t generated_bytes_; 108 size_t generated_bytes_;
109 109
110 DISALLOW_ASSIGN(HmacByteVectorGenerator); 110 DISALLOW_ASSIGN(HmacByteVectorGenerator);
111 }; 111 };
112 112
113 } // namespace rappor 113 } // namespace rappor
114 114
115 #endif // COMPONENTS_RAPPOR_BYTE_VECTOR_UTILS_H_ 115 #endif // COMPONENTS_RAPPOR_BYTE_VECTOR_UTILS_H_
OLDNEW
« no previous file with comments | « components/dom_distiller/core/css/distilledpage.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698