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 NET_QUIC_CORE_CRYPTO_AEAD_BASE_DECRYPTER_H_ | 5 #ifndef NET_QUIC_CORE_CRYPTO_AEAD_BASE_DECRYPTER_H_ |
6 #define NET_QUIC_CORE_CRYPTO_AEAD_BASE_DECRYPTER_H_ | 6 #define NET_QUIC_CORE_CRYPTO_AEAD_BASE_DECRYPTER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "net/base/net_export.h" | |
13 #include "net/quic/core/crypto/quic_decrypter.h" | 12 #include "net/quic/core/crypto/quic_decrypter.h" |
14 #include "net/quic/core/crypto/scoped_evp_aead_ctx.h" | 13 #include "net/quic/core/crypto/scoped_evp_aead_ctx.h" |
| 14 #include "net/quic/platform/api/quic_export.h" |
15 | 15 |
16 namespace net { | 16 namespace net { |
17 | 17 |
18 // AeadBaseDecrypter is the base class of AEAD QuicDecrypter subclasses. | 18 // AeadBaseDecrypter is the base class of AEAD QuicDecrypter subclasses. |
19 class NET_EXPORT_PRIVATE AeadBaseDecrypter : public QuicDecrypter { | 19 class QUIC_EXPORT_PRIVATE AeadBaseDecrypter : public QuicDecrypter { |
20 public: | 20 public: |
21 AeadBaseDecrypter(const EVP_AEAD* aead_alg, | 21 AeadBaseDecrypter(const EVP_AEAD* aead_alg, |
22 size_t key_size, | 22 size_t key_size, |
23 size_t auth_tag_size, | 23 size_t auth_tag_size, |
24 size_t nonce_prefix_size); | 24 size_t nonce_prefix_size); |
25 ~AeadBaseDecrypter() override; | 25 ~AeadBaseDecrypter() override; |
26 | 26 |
27 // QuicDecrypter implementation | 27 // QuicDecrypter implementation |
28 bool SetKey(base::StringPiece key) override; | 28 bool SetKey(base::StringPiece key) override; |
29 bool SetNoncePrefix(base::StringPiece nonce_prefix) override; | 29 bool SetNoncePrefix(base::StringPiece nonce_prefix) override; |
(...skipping 29 matching lines...) Expand all Loading... |
59 unsigned char nonce_prefix_[kMaxNoncePrefixSize]; | 59 unsigned char nonce_prefix_[kMaxNoncePrefixSize]; |
60 | 60 |
61 ScopedEVPAEADCtx ctx_; | 61 ScopedEVPAEADCtx ctx_; |
62 | 62 |
63 DISALLOW_COPY_AND_ASSIGN(AeadBaseDecrypter); | 63 DISALLOW_COPY_AND_ASSIGN(AeadBaseDecrypter); |
64 }; | 64 }; |
65 | 65 |
66 } // namespace net | 66 } // namespace net |
67 | 67 |
68 #endif // NET_QUIC_CORE_CRYPTO_AEAD_BASE_DECRYPTER_H_ | 68 #endif // NET_QUIC_CORE_CRYPTO_AEAD_BASE_DECRYPTER_H_ |
OLD | NEW |