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_CRYPTO_QUIC_DECRYPTER_H_ | 5 #ifndef NET_QUIC_CRYPTO_QUIC_DECRYPTER_H_ |
6 #define NET_QUIC_CRYPTO_QUIC_DECRYPTER_H_ | 6 #define NET_QUIC_CRYPTO_QUIC_DECRYPTER_H_ |
7 | 7 |
| 8 #include <stddef.h> |
| 9 #include <stdint.h> |
| 10 |
8 #include "net/base/net_export.h" | 11 #include "net/base/net_export.h" |
9 #include "net/quic/quic_protocol.h" | 12 #include "net/quic/quic_protocol.h" |
10 | 13 |
11 namespace net { | 14 namespace net { |
12 | 15 |
13 class NET_EXPORT_PRIVATE QuicDecrypter { | 16 class NET_EXPORT_PRIVATE QuicDecrypter { |
14 public: | 17 public: |
15 virtual ~QuicDecrypter() {} | 18 virtual ~QuicDecrypter() {} |
16 | 19 |
17 static QuicDecrypter* Create(QuicTag algorithm); | 20 static QuicDecrypter* Create(QuicTag algorithm); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 const base::StringPiece& associated_data, | 54 const base::StringPiece& associated_data, |
52 const base::StringPiece& ciphertext, | 55 const base::StringPiece& ciphertext, |
53 char* output, | 56 char* output, |
54 size_t* output_length, | 57 size_t* output_length, |
55 size_t max_output_length) = 0; | 58 size_t max_output_length) = 0; |
56 | 59 |
57 // The name of the cipher. | 60 // The name of the cipher. |
58 virtual const char* cipher_name() const = 0; | 61 virtual const char* cipher_name() const = 0; |
59 // The ID of the cipher. Return 0x03000000 ORed with the 'cryptographic suite | 62 // The ID of the cipher. Return 0x03000000 ORed with the 'cryptographic suite |
60 // selector'. | 63 // selector'. |
61 virtual uint32 cipher_id() const = 0; | 64 virtual uint32_t cipher_id() const = 0; |
62 | 65 |
63 // For use by unit tests only. | 66 // For use by unit tests only. |
64 virtual base::StringPiece GetKey() const = 0; | 67 virtual base::StringPiece GetKey() const = 0; |
65 virtual base::StringPiece GetNoncePrefix() const = 0; | 68 virtual base::StringPiece GetNoncePrefix() const = 0; |
66 }; | 69 }; |
67 | 70 |
68 } // namespace net | 71 } // namespace net |
69 | 72 |
70 #endif // NET_QUIC_CRYPTO_QUIC_DECRYPTER_H_ | 73 #endif // NET_QUIC_CRYPTO_QUIC_DECRYPTER_H_ |
OLD | NEW |