OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 CRYPTO_HKDF_H_ | 5 #ifndef CRYPTO_HKDF_H_ |
6 #define CRYPTO_HKDF_H_ | 6 #define CRYPTO_HKDF_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/strings/string_piece.h" | 13 #include "base/strings/string_piece.h" |
12 #include "crypto/crypto_export.h" | 14 #include "crypto/crypto_export.h" |
13 | 15 |
14 namespace crypto { | 16 namespace crypto { |
15 | 17 |
16 // HKDF implements the key derivation function specified in RFC 5869 (using | 18 // HKDF implements the key derivation function specified in RFC 5869 (using |
17 // SHA-256) and outputs key material, as needed by QUIC. | 19 // SHA-256) and outputs key material, as needed by QUIC. |
18 // See https://tools.ietf.org/html/rfc5869 for details. | 20 // See https://tools.ietf.org/html/rfc5869 for details. |
19 class CRYPTO_EXPORT HKDF { | 21 class CRYPTO_EXPORT HKDF { |
20 public: | 22 public: |
(...skipping 29 matching lines...) Expand all Loading... |
50 return server_write_key_; | 52 return server_write_key_; |
51 } | 53 } |
52 base::StringPiece server_write_iv() const { | 54 base::StringPiece server_write_iv() const { |
53 return server_write_iv_; | 55 return server_write_iv_; |
54 } | 56 } |
55 base::StringPiece subkey_secret() const { | 57 base::StringPiece subkey_secret() const { |
56 return subkey_secret_; | 58 return subkey_secret_; |
57 } | 59 } |
58 | 60 |
59 private: | 61 private: |
60 std::vector<uint8> output_; | 62 std::vector<uint8_t> output_; |
61 | 63 |
62 base::StringPiece client_write_key_; | 64 base::StringPiece client_write_key_; |
63 base::StringPiece server_write_key_; | 65 base::StringPiece server_write_key_; |
64 base::StringPiece client_write_iv_; | 66 base::StringPiece client_write_iv_; |
65 base::StringPiece server_write_iv_; | 67 base::StringPiece server_write_iv_; |
66 base::StringPiece subkey_secret_; | 68 base::StringPiece subkey_secret_; |
67 }; | 69 }; |
68 | 70 |
69 } // namespace crypto | 71 } // namespace crypto |
70 | 72 |
71 #endif // CRYPTO_HKDF_H_ | 73 #endif // CRYPTO_HKDF_H_ |
OLD | NEW |