| 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) {
|
|
|