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

Unified Diff: net/quic/crypto/chacha20_poly1305_decrypter_test.cc

Issue 1918953003: Landing Recent QUIC changes until 4/22/2016 14:55 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Deleted SpdyFramerTests missed while mergeing 120451808 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/crypto/chacha20_poly1305_decrypter.cc ('k') | net/quic/crypto/chacha20_poly1305_encrypter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/crypto/chacha20_poly1305_decrypter_test.cc
diff --git a/net/quic/crypto/chacha20_poly1305_rfc7539_decrypter_test.cc b/net/quic/crypto/chacha20_poly1305_decrypter_test.cc
similarity index 93%
rename from net/quic/crypto/chacha20_poly1305_rfc7539_decrypter_test.cc
rename to net/quic/crypto/chacha20_poly1305_decrypter_test.cc
index bc09d3e14a13a178cd4636791995fb0eacf3362f..6e2cf554545b8851406a507fcbaf053360a5d199 100644
--- a/net/quic/crypto/chacha20_poly1305_rfc7539_decrypter_test.cc
+++ b/net/quic/crypto/chacha20_poly1305_decrypter_test.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/quic/crypto/chacha20_poly1305_rfc7539_decrypter.h"
+#include "net/quic/crypto/chacha20_poly1305_decrypter.h"
#include <memory>
@@ -112,7 +112,7 @@ namespace test {
// DecryptWithNonce wraps the |Decrypt| method of |decrypter| to allow passing
// in an nonce and also to allocate the buffer needed for the plaintext.
-QuicData* DecryptWithNonce(ChaCha20Poly1305Rfc7539Decrypter* decrypter,
+QuicData* DecryptWithNonce(ChaCha20Poly1305Decrypter* decrypter,
StringPiece nonce,
StringPiece associated_data,
StringPiece ciphertext) {
@@ -136,11 +136,7 @@ QuicData* DecryptWithNonce(ChaCha20Poly1305Rfc7539Decrypter* decrypter,
return new QuicData(output.release(), output_length, true);
}
-TEST(ChaCha20Poly1305Rfc7539DecrypterTest, Decrypt) {
- if (!ChaCha20Poly1305Rfc7539Decrypter::IsSupported()) {
- VLOG(1) << "ChaCha20+Poly1305 not supported. Test skipped.";
- return;
- }
+TEST(ChaCha20Poly1305DecrypterTest, Decrypt) {
for (size_t i = 0; test_vectors[i].key != nullptr; i++) {
// If not present then decryption is expected to fail.
bool has_pt = test_vectors[i].pt;
@@ -161,7 +157,7 @@ TEST(ChaCha20Poly1305Rfc7539DecrypterTest, Decrypt) {
ASSERT_TRUE(DecodeHexString(test_vectors[i].pt, &pt));
}
- ChaCha20Poly1305Rfc7539Decrypter decrypter;
+ ChaCha20Poly1305Decrypter decrypter;
ASSERT_TRUE(decrypter.SetKey(key));
std::unique_ptr<QuicData> decrypted(DecryptWithNonce(
&decrypter, fixed + iv,
« no previous file with comments | « net/quic/crypto/chacha20_poly1305_decrypter.cc ('k') | net/quic/crypto/chacha20_poly1305_encrypter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698