| Index: net/quic/crypto/null_encrypter.cc
|
| diff --git a/net/quic/crypto/null_encrypter.cc b/net/quic/crypto/null_encrypter.cc
|
| index 5f1a85b114aa25d25bec69e929293af0752f0868..5f504b2d9df20494d49dca0f8cf585d2c5b070d1 100644
|
| --- a/net/quic/crypto/null_encrypter.cc
|
| +++ b/net/quic/crypto/null_encrypter.cc
|
| @@ -13,19 +13,21 @@ namespace net {
|
|
|
| const size_t kHashSizeShort = 12; // size of uint128 serialized short
|
|
|
| -NullEncrypter::NullEncrypter() {}
|
| +NullEncrypter::NullEncrypter() {
|
| +}
|
|
|
| -bool NullEncrypter::SetKey(StringPiece key) { return key.empty(); }
|
| +bool NullEncrypter::SetKey(StringPiece key) {
|
| + return key.empty();
|
| +}
|
|
|
| bool NullEncrypter::SetNoncePrefix(StringPiece nonce_prefix) {
|
| return nonce_prefix.empty();
|
| }
|
|
|
| -bool NullEncrypter::Encrypt(
|
| - StringPiece /*nonce*/,
|
| - StringPiece associated_data,
|
| - StringPiece plaintext,
|
| - unsigned char* output) {
|
| +bool NullEncrypter::Encrypt(StringPiece /*nonce*/,
|
| + StringPiece associated_data,
|
| + StringPiece plaintext,
|
| + unsigned char* output) {
|
| string buffer = associated_data.as_string();
|
| plaintext.AppendToString(&buffer);
|
| uint128 hash = QuicUtils::FNV1a_128_Hash(buffer.data(), buffer.length());
|
| @@ -44,9 +46,13 @@ QuicData* NullEncrypter::EncryptPacket(
|
| return new QuicData(reinterpret_cast<char*>(buffer), len, true);
|
| }
|
|
|
| -size_t NullEncrypter::GetKeySize() const { return 0; }
|
| +size_t NullEncrypter::GetKeySize() const {
|
| + return 0;
|
| +}
|
|
|
| -size_t NullEncrypter::GetNoncePrefixSize() const { return 0; }
|
| +size_t NullEncrypter::GetNoncePrefixSize() const {
|
| + return 0;
|
| +}
|
|
|
| size_t NullEncrypter::GetMaxPlaintextSize(size_t ciphertext_size) const {
|
| return ciphertext_size - GetHashLength();
|
| @@ -56,9 +62,13 @@ size_t NullEncrypter::GetCiphertextSize(size_t plaintext_size) const {
|
| return plaintext_size + GetHashLength();
|
| }
|
|
|
| -StringPiece NullEncrypter::GetKey() const { return StringPiece(); }
|
| +StringPiece NullEncrypter::GetKey() const {
|
| + return StringPiece();
|
| +}
|
|
|
| -StringPiece NullEncrypter::GetNoncePrefix() const { return StringPiece(); }
|
| +StringPiece NullEncrypter::GetNoncePrefix() const {
|
| + return StringPiece();
|
| +}
|
|
|
| size_t NullEncrypter::GetHashLength() const {
|
| return kHashSizeShort;
|
|
|