| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 virtual size_t GetMaxPlaintextSize(size_t ciphertext_size) const OVERRIDE; | 54 virtual size_t GetMaxPlaintextSize(size_t ciphertext_size) const OVERRIDE; |
| 55 virtual size_t GetCiphertextSize(size_t plaintext_size) const OVERRIDE; | 55 virtual size_t GetCiphertextSize(size_t plaintext_size) const OVERRIDE; |
| 56 virtual base::StringPiece GetKey() const OVERRIDE; | 56 virtual base::StringPiece GetKey() const OVERRIDE; |
| 57 virtual base::StringPiece GetNoncePrefix() const OVERRIDE; | 57 virtual base::StringPiece GetNoncePrefix() const OVERRIDE; |
| 58 | 58 |
| 59 private: | 59 private: |
| 60 // The 128-bit AES key. | 60 // The 128-bit AES key. |
| 61 unsigned char key_[16]; | 61 unsigned char key_[16]; |
| 62 // The nonce prefix. | 62 // The nonce prefix. |
| 63 unsigned char nonce_prefix_[4]; | 63 unsigned char nonce_prefix_[4]; |
| 64 // last_seq_num_ is the last sequence number observed. |
| 65 QuicPacketSequenceNumber last_seq_num_; |
| 64 | 66 |
| 65 #if defined(USE_OPENSSL) | 67 #if defined(USE_OPENSSL) |
| 66 ScopedEVPCipherCtx ctx_; | 68 ScopedEVPCipherCtx ctx_; |
| 67 #endif | 69 #endif |
| 68 }; | 70 }; |
| 69 | 71 |
| 70 } // namespace net | 72 } // namespace net |
| 71 | 73 |
| 72 #endif // NET_QUIC_CRYPTO_AES_128_GCM_12_ENCRYPTER_H_ | 74 #endif // NET_QUIC_CRYPTO_AES_128_GCM_12_ENCRYPTER_H_ |
| OLD | NEW |