Index: net/quic/crypto/crypto_secret_boxer.cc |
diff --git a/net/quic/crypto/crypto_secret_boxer.cc b/net/quic/crypto/crypto_secret_boxer.cc |
index 5d8a11b27a309c9a612d8194732af76ef1e1a39a..2675441d26f1afb31c2abed656427ac548774bb1 100644 |
--- a/net/quic/crypto/crypto_secret_boxer.cc |
+++ b/net/quic/crypto/crypto_secret_boxer.cc |
@@ -33,7 +33,9 @@ static const size_t kKeySize = 16; |
static const size_t kBoxNonceSize = 12; |
// static |
-size_t CryptoSecretBoxer::GetKeySize() { return kKeySize; } |
+size_t CryptoSecretBoxer::GetKeySize() { |
+ return kKeySize; |
+} |
void CryptoSecretBoxer::SetKey(StringPiece key) { |
DCHECK_EQ(kKeySize, key.size()); |
@@ -57,9 +59,11 @@ string CryptoSecretBoxer::Box(QuicRandom* rand, StringPiece plaintext) const { |
rand->RandBytes(data, kBoxNonceSize); |
memcpy(data + kBoxNonceSize, plaintext.data(), plaintext.size()); |
- if (!encrypter->Encrypt(StringPiece(data, kBoxNonceSize), StringPiece(), |
- plaintext, reinterpret_cast<unsigned char*>( |
- data + kBoxNonceSize))) { |
+ if (!encrypter->Encrypt( |
+ StringPiece(data, kBoxNonceSize), |
+ StringPiece(), |
+ plaintext, |
+ reinterpret_cast<unsigned char*>(data + kBoxNonceSize))) { |
DLOG(DFATAL) << "CryptoSecretBoxer's Encrypt failed."; |
return string(); |
} |
@@ -87,8 +91,10 @@ bool CryptoSecretBoxer::Unbox(StringPiece ciphertext, |
DLOG(DFATAL) << "CryptoSecretBoxer's decrypter->SetKey failed."; |
return false; |
} |
- if (!decrypter->Decrypt(StringPiece(nonce, kBoxNonceSize), StringPiece(), |
- ciphertext, reinterpret_cast<unsigned char*>(data), |
+ if (!decrypter->Decrypt(StringPiece(nonce, kBoxNonceSize), |
+ StringPiece(), |
+ ciphertext, |
+ reinterpret_cast<unsigned char*>(data), |
&len)) { |
return false; |
} |