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

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

Issue 2193073003: Move shared files in net/quic/ into net/quic/core/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: io_thread_unittest.cc Created 4 years, 5 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/quic_decrypter.h ('k') | net/quic/crypto/quic_encrypter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/crypto/quic_decrypter.cc
diff --git a/net/quic/crypto/quic_decrypter.cc b/net/quic/crypto/quic_decrypter.cc
deleted file mode 100644
index 7b2df54d1372baccd2be4f53e1a3b0f8c1f2fcec..0000000000000000000000000000000000000000
--- a/net/quic/crypto/quic_decrypter.cc
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "net/quic/crypto/quic_decrypter.h"
-
-#include "crypto/hkdf.h"
-#include "net/quic/crypto/aes_128_gcm_12_decrypter.h"
-#include "net/quic/crypto/chacha20_poly1305_decrypter.h"
-#include "net/quic/crypto/crypto_protocol.h"
-#include "net/quic/crypto/null_decrypter.h"
-
-using base::StringPiece;
-using std::string;
-
-namespace net {
-
-// static
-QuicDecrypter* QuicDecrypter::Create(QuicTag algorithm) {
- switch (algorithm) {
- case kAESG:
- return new Aes128Gcm12Decrypter();
- case kCC20:
- return new ChaCha20Poly1305Decrypter();
- case kNULL:
- return new NullDecrypter();
- default:
- LOG(FATAL) << "Unsupported algorithm: " << algorithm;
- return nullptr;
- }
-}
-
-// static
-void QuicDecrypter::DiversifyPreliminaryKey(StringPiece preliminary_key,
- StringPiece nonce_prefix,
- DiversificationNonce nonce,
- size_t key_size,
- size_t nonce_prefix_size,
- string* out_key,
- string* out_nonce_prefix) {
- crypto::HKDF hkdf(preliminary_key.as_string() + nonce_prefix.as_string(),
- StringPiece(nonce, kDiversificationNonceSize),
- "QUIC key diversification", 0, key_size, 0,
- nonce_prefix_size, 0);
- *out_key = hkdf.server_write_key().as_string();
- *out_nonce_prefix = hkdf.server_write_iv().as_string();
-}
-
-} // namespace net
« no previous file with comments | « net/quic/crypto/quic_decrypter.h ('k') | net/quic/crypto/quic_encrypter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698