OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/null_decrypter.h" | 5 #include "net/quic/crypto/null_decrypter.h" |
6 #include "net/quic/quic_utils.h" | 6 #include "net/quic/quic_utils.h" |
7 #include "net/quic/quic_data_reader.h" | 7 #include "net/quic/quic_data_reader.h" |
8 | 8 |
9 using base::StringPiece; | 9 using base::StringPiece; |
10 using std::string; | 10 using std::string; |
(...skipping 23 matching lines...) Expand all Loading... |
34 // TODO(rch): avoid buffer copy here | 34 // TODO(rch): avoid buffer copy here |
35 string buffer = associated_data.as_string(); | 35 string buffer = associated_data.as_string(); |
36 plaintext.AppendToString(&buffer); | 36 plaintext.AppendToString(&buffer); |
37 | 37 |
38 if (hash != QuicUtils::FNV1a_128_Hash(buffer.data(), buffer.length())) { | 38 if (hash != QuicUtils::FNV1a_128_Hash(buffer.data(), buffer.length())) { |
39 return NULL; | 39 return NULL; |
40 } | 40 } |
41 return new QuicData(plaintext.data(), plaintext.length()); | 41 return new QuicData(plaintext.data(), plaintext.length()); |
42 } | 42 } |
43 | 43 |
| 44 StringPiece NullDecrypter::GetKey() const { |
| 45 return StringPiece(); |
| 46 } |
| 47 |
| 48 StringPiece NullDecrypter::GetNoncePrefix() const { |
| 49 return StringPiece(); |
| 50 } |
| 51 |
44 } // namespace net | 52 } // namespace net |
OLD | NEW |