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

Side by Side Diff: net/quic/crypto/aes_128_gcm_12_decrypter.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
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_DECRYPTER_H_ 5 #ifndef NET_QUIC_CRYPTO_AES_128_GCM_12_DECRYPTER_H_
6 #define NET_QUIC_CRYPTO_AES_128_GCM_12_DECRYPTER_H_ 6 #define NET_QUIC_CRYPTO_AES_128_GCM_12_DECRYPTER_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 Aes128Gcm12Decrypter : public QuicDecrypter { 29 class NET_EXPORT_PRIVATE Aes128Gcm12Decrypter : public QuicDecrypter {
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 Aes128Gcm12Decrypter(); 36 Aes128Gcm12Decrypter();
37 virtual ~Aes128Gcm12Decrypter(); 37 virtual ~Aes128Gcm12Decrypter() OVERRIDE;
38 38
39 // Returns true if the underlying crypto library supports AES GCM. 39 // Returns true if the underlying crypto library supports AES GCM.
40 static bool IsSupported(); 40 static bool IsSupported();
41 41
42 // QuicDecrypter implementation 42 // QuicDecrypter implementation
43 virtual bool SetKey(base::StringPiece key) OVERRIDE; 43 virtual bool SetKey(base::StringPiece key) OVERRIDE;
44 virtual bool SetNoncePrefix(base::StringPiece nonce_prefix) OVERRIDE; 44 virtual bool SetNoncePrefix(base::StringPiece nonce_prefix) OVERRIDE;
45 virtual bool Decrypt(base::StringPiece nonce, 45 virtual bool Decrypt(base::StringPiece nonce,
46 base::StringPiece associated_data, 46 base::StringPiece associated_data,
47 base::StringPiece ciphertext, 47 base::StringPiece ciphertext,
(...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_DECRYPTER_H_ 69 #endif // NET_QUIC_CRYPTO_AES_128_GCM_12_DECRYPTER_H_
OLDNEW
« no previous file with comments | « net/quic/congestion_control/tcp_cubic_sender_test.cc ('k') | net/quic/crypto/aes_128_gcm_12_encrypter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698