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

Side by Side Diff: net/quic/crypto/aes_128_gcm_12_encrypter_test.cc

Issue 1908103002: Landing Recent QUIC changes until 4/15/2016 17:20 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 years, 8 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
« no previous file with comments | « net/quic/crypto/aes_128_gcm_12_decrypter_test.cc ('k') | net/quic/crypto/cert_compressor.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 #include "net/quic/crypto/aes_128_gcm_12_encrypter.h" 5 #include "net/quic/crypto/aes_128_gcm_12_encrypter.h"
6 6
7 #include <memory>
8
7 #include "net/quic/test_tools/quic_test_utils.h" 9 #include "net/quic/test_tools/quic_test_utils.h"
8 10
9 using base::StringPiece; 11 using base::StringPiece;
10 using std::string; 12 using std::string;
11 13
12 namespace { 14 namespace {
13 15
14 // The AES GCM test vectors come from the file gcmEncryptExtIV128.rsp 16 // The AES GCM test vectors come from the file gcmEncryptExtIV128.rsp
15 // downloaded from http://csrc.nist.gov/groups/STM/cavp/index.html on 17 // downloaded from http://csrc.nist.gov/groups/STM/cavp/index.html on
16 // 2013-02-01. The test vectors in that file look like this: 18 // 2013-02-01. The test vectors in that file look like this:
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 234
233 TEST(Aes128Gcm12EncrypterTest, GetCiphertextSize) { 235 TEST(Aes128Gcm12EncrypterTest, GetCiphertextSize) {
234 Aes128Gcm12Encrypter encrypter; 236 Aes128Gcm12Encrypter encrypter;
235 EXPECT_EQ(1012u, encrypter.GetCiphertextSize(1000)); 237 EXPECT_EQ(1012u, encrypter.GetCiphertextSize(1000));
236 EXPECT_EQ(112u, encrypter.GetCiphertextSize(100)); 238 EXPECT_EQ(112u, encrypter.GetCiphertextSize(100));
237 EXPECT_EQ(22u, encrypter.GetCiphertextSize(10)); 239 EXPECT_EQ(22u, encrypter.GetCiphertextSize(10));
238 } 240 }
239 241
240 } // namespace test 242 } // namespace test
241 } // namespace net 243 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/crypto/aes_128_gcm_12_decrypter_test.cc ('k') | net/quic/crypto/cert_compressor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698