| 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_CRYPTO_AES_128_GCM_12_ENCRYPTER_H_ | 5 #ifndef NET_QUIC_CRYPTO_AES_128_GCM_12_ENCRYPTER_H_ |
| 6 #define NET_QUIC_CRYPTO_AES_128_GCM_12_ENCRYPTER_H_ | 6 #define NET_QUIC_CRYPTO_AES_128_GCM_12_ENCRYPTER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 class NET_EXPORT_PRIVATE Aes128Gcm12Encrypter : public AeadBaseEncrypter { | 21 class NET_EXPORT_PRIVATE Aes128Gcm12Encrypter : public AeadBaseEncrypter { |
| 22 public: | 22 public: |
| 23 enum { | 23 enum { |
| 24 // Authentication tags are truncated to 96 bits. | 24 // Authentication tags are truncated to 96 bits. |
| 25 kAuthTagSize = 12, | 25 kAuthTagSize = 12, |
| 26 }; | 26 }; |
| 27 | 27 |
| 28 Aes128Gcm12Encrypter(); | 28 Aes128Gcm12Encrypter(); |
| 29 ~Aes128Gcm12Encrypter() override; | 29 ~Aes128Gcm12Encrypter() override; |
| 30 | 30 |
| 31 #if !defined(USE_OPENSSL) | |
| 32 protected: | |
| 33 // AeadBaseEncrypter methods: | |
| 34 void FillAeadParams(base::StringPiece nonce, | |
| 35 base::StringPiece associated_data, | |
| 36 size_t auth_tag_size, | |
| 37 AeadParams* aead_params) const override; | |
| 38 #endif | |
| 39 | |
| 40 private: | 31 private: |
| 41 DISALLOW_COPY_AND_ASSIGN(Aes128Gcm12Encrypter); | 32 DISALLOW_COPY_AND_ASSIGN(Aes128Gcm12Encrypter); |
| 42 }; | 33 }; |
| 43 | 34 |
| 44 } // namespace net | 35 } // namespace net |
| 45 | 36 |
| 46 #endif // NET_QUIC_CRYPTO_AES_128_GCM_12_ENCRYPTER_H_ | 37 #endif // NET_QUIC_CRYPTO_AES_128_GCM_12_ENCRYPTER_H_ |
| OLD | NEW |