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 <stddef.h> |
| 9 #include <stdint.h> |
| 10 |
8 #include <vector> | 11 #include <vector> |
9 | 12 |
10 #include "base/basictypes.h" | |
11 #include "base/macros.h" | 13 #include "base/macros.h" |
12 #include "components/rappor/rappor_parameters.h" | 14 #include "components/rappor/rappor_parameters.h" |
13 #include "crypto/hmac.h" | 15 #include "crypto/hmac.h" |
14 | 16 |
15 namespace rappor { | 17 namespace rappor { |
16 | 18 |
17 // A vector of 8-bit integers used to store a set of binary bits. | 19 // A vector of 8-bit integers used to store a set of binary bits. |
18 typedef std::vector<uint8_t> ByteVector; | 20 typedef std::vector<uint8_t> ByteVector; |
19 | 21 |
20 // Converts the lowest |size| bytes of |value| into a ByteVector. | 22 // Converts the lowest |size| bytes of |value| into a ByteVector. |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 | 111 |
110 // Total number of bytes streamed from the HMAC_DRBG Generate Process. | 112 // Total number of bytes streamed from the HMAC_DRBG Generate Process. |
111 size_t generated_bytes_; | 113 size_t generated_bytes_; |
112 | 114 |
113 DISALLOW_ASSIGN(HmacByteVectorGenerator); | 115 DISALLOW_ASSIGN(HmacByteVectorGenerator); |
114 }; | 116 }; |
115 | 117 |
116 } // namespace rappor | 118 } // namespace rappor |
117 | 119 |
118 #endif // COMPONENTS_RAPPOR_BYTE_VECTOR_UTILS_H_ | 120 #endif // COMPONENTS_RAPPOR_BYTE_VECTOR_UTILS_H_ |
OLD | NEW |