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

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

Issue 2566783002: Various formatting cleanups to net/quic/crypto and net/quic/congestion_control (Closed)
Patch Set: Rebase Created 3 years, 12 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
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_CORE_CRYPTO_AES_128_GCM_12_ENCRYPTER_H_ 5 #ifndef NET_QUIC_CORE_CRYPTO_AES_128_GCM_12_ENCRYPTER_H_
6 #define NET_QUIC_CORE_CRYPTO_AES_128_GCM_12_ENCRYPTER_H_ 6 #define NET_QUIC_CORE_CRYPTO_AES_128_GCM_12_ENCRYPTER_H_
7 7
8 #include <stddef.h>
9
10 #include "base/macros.h" 8 #include "base/macros.h"
11 #include "net/quic/core/crypto/aead_base_encrypter.h" 9 #include "net/quic/core/crypto/aead_base_encrypter.h"
12 #include "net/quic/platform/api/quic_export.h" 10 #include "net/quic/platform/api/quic_export.h"
13 11
14 namespace net { 12 namespace net {
15 13
16 // An Aes128Gcm12Encrypter is a QuicEncrypter that implements the 14 // An Aes128Gcm12Encrypter is a QuicEncrypter that implements the
17 // AEAD_AES_128_GCM_12 algorithm specified in RFC 5282. Create an instance by 15 // AEAD_AES_128_GCM_12 algorithm specified in RFC 5282. Create an instance by
18 // calling QuicEncrypter::Create(kAESG). 16 // calling QuicEncrypter::Create(kAESG).
19 // 17 //
20 // It uses an authentication tag of 12 bytes (96 bits). The fixed prefix 18 // It uses an authentication tag of 12 bytes (96 bits). The fixed prefix
21 // of the nonce is four bytes. 19 // of the nonce is four bytes.
22 class QUIC_EXPORT_PRIVATE Aes128Gcm12Encrypter : public AeadBaseEncrypter { 20 class QUIC_EXPORT_PRIVATE Aes128Gcm12Encrypter : public AeadBaseEncrypter {
23 public: 21 public:
24 enum { 22 enum {
25 // Authentication tags are truncated to 96 bits. 23 // Authentication tags are truncated to 96 bits.
26 kAuthTagSize = 12, 24 kAuthTagSize = 12,
27 }; 25 };
28 26
29 Aes128Gcm12Encrypter(); 27 Aes128Gcm12Encrypter();
30 ~Aes128Gcm12Encrypter() override; 28 ~Aes128Gcm12Encrypter() override;
31 29
32 private: 30 private:
33 DISALLOW_COPY_AND_ASSIGN(Aes128Gcm12Encrypter); 31 DISALLOW_COPY_AND_ASSIGN(Aes128Gcm12Encrypter);
34 }; 32 };
35 33
36 } // namespace net 34 } // namespace net
37 35
38 #endif // NET_QUIC_CORE_CRYPTO_AES_128_GCM_12_ENCRYPTER_H_ 36 #endif // NET_QUIC_CORE_CRYPTO_AES_128_GCM_12_ENCRYPTER_H_
OLDNEW
« no previous file with comments | « net/quic/core/crypto/aes_128_gcm_12_decrypter_test.cc ('k') | net/quic/core/crypto/chacha20_poly1305_decrypter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698