Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1008)

Side by Side Diff: net/quic/crypto/aes_128_gcm_12_encrypter.h

Issue 126283002: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: removed extra space Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/quic/crypto/aes_128_gcm_12_decrypter.h ('k') | net/quic/crypto/common_cert_set.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 16 matching lines...) Expand all
27 // It uses an authentication tag of 12 bytes (96 bits). The fixed prefix 27 // It uses an authentication tag of 12 bytes (96 bits). The fixed prefix
28 // of the nonce is four bytes. 28 // of the nonce is four bytes.
29 class NET_EXPORT_PRIVATE Aes128Gcm12Encrypter : public QuicEncrypter { 29 class NET_EXPORT_PRIVATE Aes128Gcm12Encrypter : public QuicEncrypter {
30 public: 30 public:
31 enum { 31 enum {
32 // Authentication tags are truncated to 96 bits. 32 // Authentication tags are truncated to 96 bits.
33 kAuthTagSize = 12, 33 kAuthTagSize = 12,
34 }; 34 };
35 35
36 Aes128Gcm12Encrypter(); 36 Aes128Gcm12Encrypter();
37 virtual ~Aes128Gcm12Encrypter(); 37 virtual ~Aes128Gcm12Encrypter() OVERRIDE;
38 38
39 // QuicEncrypter implementation 39 // QuicEncrypter implementation
40 virtual bool SetKey(base::StringPiece key) OVERRIDE; 40 virtual bool SetKey(base::StringPiece key) OVERRIDE;
41 virtual bool SetNoncePrefix(base::StringPiece nonce_prefix) OVERRIDE; 41 virtual bool SetNoncePrefix(base::StringPiece nonce_prefix) OVERRIDE;
42 virtual bool Encrypt(base::StringPiece nonce, 42 virtual bool Encrypt(base::StringPiece nonce,
43 base::StringPiece associated_data, 43 base::StringPiece associated_data,
44 base::StringPiece plaintext, 44 base::StringPiece plaintext,
45 unsigned char* output) OVERRIDE; 45 unsigned char* output) OVERRIDE;
46 virtual QuicData* EncryptPacket(QuicPacketSequenceNumber sequence_number, 46 virtual QuicData* EncryptPacket(QuicPacketSequenceNumber sequence_number,
47 base::StringPiece associated_data, 47 base::StringPiece associated_data,
(...skipping 12 matching lines...) Expand all
60 unsigned char nonce_prefix_[4]; 60 unsigned char nonce_prefix_[4];
61 61
62 #if defined(USE_OPENSSL) 62 #if defined(USE_OPENSSL)
63 ScopedEVPAEADCtx ctx_; 63 ScopedEVPAEADCtx ctx_;
64 #endif 64 #endif
65 }; 65 };
66 66
67 } // namespace net 67 } // namespace net
68 68
69 #endif // NET_QUIC_CRYPTO_AES_128_GCM_12_ENCRYPTER_H_ 69 #endif // NET_QUIC_CRYPTO_AES_128_GCM_12_ENCRYPTER_H_
OLDNEW
« no previous file with comments | « net/quic/crypto/aes_128_gcm_12_decrypter.h ('k') | net/quic/crypto/common_cert_set.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698