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

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

Issue 885443002: Roll Chrome into Mojo. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase to ToT mojo Created 5 years, 11 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/null_decrypter.h ('k') | net/quic/crypto/proof_verifier_chromium.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/crypto/null_decrypter.cc
diff --git a/net/quic/crypto/null_decrypter.cc b/net/quic/crypto/null_decrypter.cc
index 77aee4c8152f4621bd6f3bc3db970e6c4469261f..4411b7c0ba1fe460a51f82bf05933041c4c02b7c 100644
--- a/net/quic/crypto/null_decrypter.cc
+++ b/net/quic/crypto/null_decrypter.cc
@@ -19,31 +19,6 @@ bool NullDecrypter::SetNoncePrefix(StringPiece nonce_prefix) {
return nonce_prefix.empty();
}
-bool NullDecrypter::Decrypt(StringPiece /*nonce*/,
- StringPiece associated_data,
- StringPiece ciphertext,
- unsigned char* output,
- size_t* output_length) {
- QuicDataReader reader(ciphertext.data(), ciphertext.length());
-
- uint128 hash;
- if (!ReadHash(&reader, &hash)) {
- return false;
- }
-
- StringPiece plaintext = reader.ReadRemainingPayload();
-
- // TODO(rch): avoid buffer copy here
- string buffer = associated_data.as_string();
- plaintext.AppendToString(&buffer);
- if (hash != ComputeHash(buffer)) {
- return false;
- }
- memcpy(output, plaintext.data(), plaintext.length());
- *output_length = plaintext.length();
- return true;
-}
-
QuicData* NullDecrypter::DecryptPacket(QuicPacketSequenceNumber /*seq_number*/,
StringPiece associated_data,
StringPiece ciphertext) {
« no previous file with comments | « net/quic/crypto/null_decrypter.h ('k') | net/quic/crypto/proof_verifier_chromium.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698