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

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

Issue 763833003: Remove using namespace in net/quic/quic_stream_sequencer.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: resolve ramant's comment, using std:: for .cc Created 6 years 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/chacha20_poly1305_encrypter.h" 5 #include "net/quic/crypto/chacha20_poly1305_encrypter.h"
6 6
7 #include <string>
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;
12 using std::string;
10 13
11 namespace { 14 namespace {
12 15
13 // The test vectors come from draft-agl-tls-chacha20poly1305-04 Section 7. 16 // The test vectors come from draft-agl-tls-chacha20poly1305-04 Section 7.
14 17
15 // Each test vector consists of five strings of lowercase hexadecimal digits. 18 // Each test vector consists of five strings of lowercase hexadecimal digits.
16 // The strings may be empty (zero length). A test vector with a NULL |key| 19 // The strings may be empty (zero length). A test vector with a NULL |key|
17 // marks the end of an array of test vectors. 20 // marks the end of an array of test vectors.
18 struct TestVector { 21 struct TestVector {
19 const char* key; 22 const char* key;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 102
100 TEST(ChaCha20Poly1305EncrypterTest, GetCiphertextSize) { 103 TEST(ChaCha20Poly1305EncrypterTest, GetCiphertextSize) {
101 ChaCha20Poly1305Encrypter encrypter; 104 ChaCha20Poly1305Encrypter encrypter;
102 EXPECT_EQ(1012u, encrypter.GetCiphertextSize(1000)); 105 EXPECT_EQ(1012u, encrypter.GetCiphertextSize(1000));
103 EXPECT_EQ(112u, encrypter.GetCiphertextSize(100)); 106 EXPECT_EQ(112u, encrypter.GetCiphertextSize(100));
104 EXPECT_EQ(22u, encrypter.GetCiphertextSize(10)); 107 EXPECT_EQ(22u, encrypter.GetCiphertextSize(10));
105 } 108 }
106 109
107 } // namespace test 110 } // namespace test
108 } // namespace net 111 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698