| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 NET_QUIC_CORE_CRYPTO_QUIC_DECRYPTER_H_ | 5 #ifndef NET_QUIC_CORE_CRYPTO_QUIC_DECRYPTER_H_ |
| 6 #define NET_QUIC_CORE_CRYPTO_QUIC_DECRYPTER_H_ | 6 #define NET_QUIC_CORE_CRYPTO_QUIC_DECRYPTER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| 11 #include "net/base/net_export.h" | |
| 12 #include "net/quic/core/quic_packets.h" | 11 #include "net/quic/core/quic_packets.h" |
| 12 #include "net/quic/platform/api/quic_export.h" |
| 13 | 13 |
| 14 namespace net { | 14 namespace net { |
| 15 | 15 |
| 16 class NET_EXPORT_PRIVATE QuicDecrypter { | 16 class QUIC_EXPORT_PRIVATE QuicDecrypter { |
| 17 public: | 17 public: |
| 18 virtual ~QuicDecrypter() {} | 18 virtual ~QuicDecrypter() {} |
| 19 | 19 |
| 20 static QuicDecrypter* Create(QuicTag algorithm); | 20 static QuicDecrypter* Create(QuicTag algorithm); |
| 21 | 21 |
| 22 // Sets the encryption key. Returns true on success, false on failure. | 22 // Sets the encryption key. Returns true on success, false on failure. |
| 23 // | 23 // |
| 24 // NOTE: The key is the client_write_key or server_write_key derived from | 24 // NOTE: The key is the client_write_key or server_write_key derived from |
| 25 // the master secret. | 25 // the master secret. |
| 26 virtual bool SetKey(base::StringPiece key) = 0; | 26 virtual bool SetKey(base::StringPiece key) = 0; |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 const DiversificationNonce& nonce, | 89 const DiversificationNonce& nonce, |
| 90 size_t key_size, | 90 size_t key_size, |
| 91 size_t nonce_prefix_size, | 91 size_t nonce_prefix_size, |
| 92 std::string* out_key, | 92 std::string* out_key, |
| 93 std::string* out_nonce_prefix); | 93 std::string* out_nonce_prefix); |
| 94 }; | 94 }; |
| 95 | 95 |
| 96 } // namespace net | 96 } // namespace net |
| 97 | 97 |
| 98 #endif // NET_QUIC_CORE_CRYPTO_QUIC_DECRYPTER_H_ | 98 #endif // NET_QUIC_CORE_CRYPTO_QUIC_DECRYPTER_H_ |
| OLD | NEW |