OLD | NEW |
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" |
| 11 #include "base/macros.h" |
11 #include "components/rappor/rappor_parameters.h" | 12 #include "components/rappor/rappor_parameters.h" |
12 #include "crypto/hmac.h" | 13 #include "crypto/hmac.h" |
13 | 14 |
14 namespace rappor { | 15 namespace rappor { |
15 | 16 |
16 // A vector of 8-bit integers used to store a set of binary bits. | 17 // A vector of 8-bit integers used to store a set of binary bits. |
17 typedef std::vector<uint8_t> ByteVector; | 18 typedef std::vector<uint8_t> ByteVector; |
18 | 19 |
19 // Computes a bitwise OR of byte vectors and stores the result in rhs. | 20 // Computes a bitwise OR of byte vectors and stores the result in rhs. |
20 // Returns rhs for chaining. | 21 // Returns rhs for chaining. |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 | 102 |
102 // Total number of bytes streamed from the HMAC_DRBG Generate Process. | 103 // Total number of bytes streamed from the HMAC_DRBG Generate Process. |
103 size_t generated_bytes_; | 104 size_t generated_bytes_; |
104 | 105 |
105 DISALLOW_ASSIGN(HmacByteVectorGenerator); | 106 DISALLOW_ASSIGN(HmacByteVectorGenerator); |
106 }; | 107 }; |
107 | 108 |
108 } // namespace rappor | 109 } // namespace rappor |
109 | 110 |
110 #endif // COMPONENTS_RAPPOR_BYTE_VECTOR_UTILS_H_ | 111 #endif // COMPONENTS_RAPPOR_BYTE_VECTOR_UTILS_H_ |
OLD | NEW |