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

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

Issue 266243004: Clang format slam. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
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;

Powered by Google App Engine
This is Rietveld 408576698