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

Unified Diff: net/quic/crypto/crypto_secret_boxer.h

Issue 257123002: CryptoSecretBoxer cleanup changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with TOT Created 6 years, 8 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
« no previous file with comments | « no previous file | net/quic/crypto/crypto_secret_boxer.cc » ('j') | net/quic/crypto/crypto_secret_boxer.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/crypto/crypto_secret_boxer.h
diff --git a/net/quic/crypto/crypto_secret_boxer.h b/net/quic/crypto/crypto_secret_boxer.h
index 6deb7718157a9d2065ba3bd82425538e5e672b9a..38b8fb339ece4160ee2523493e05eafd58edc225 100644
--- a/net/quic/crypto/crypto_secret_boxer.h
+++ b/net/quic/crypto/crypto_secret_boxer.h
@@ -7,11 +7,8 @@
#include <string>
-#include "base/memory/scoped_ptr.h"
#include "base/strings/string_piece.h"
#include "net/base/net_export.h"
-#include "net/quic/crypto/quic_decrypter.h"
-#include "net/quic/crypto/quic_encrypter.h"
namespace net {
@@ -22,17 +19,14 @@ class QuicRandom;
// thread-safe.
class NET_EXPORT_PRIVATE CryptoSecretBoxer {
public:
- // Initializes |encrypter_| and |decrypter_| data members.
- CryptoSecretBoxer();
- ~CryptoSecretBoxer();
+ CryptoSecretBoxer() {}
ramant (doing other things) 2014/04/29 00:41:49 Will merge this line into internal source tree.
// GetKeySize returns the number of bytes in a key.
static size_t GetKeySize();
// SetKey sets the key for this object. This must be done before |Box| or
- // |Unbox| are called. |key| must be |GetKeySize()| bytes long. Returns false
- // if |encrypter_| or |decrypter_|'s SetKey method fails.
- bool SetKey(base::StringPiece key);
+ // |Unbox| are called. |key| must be |GetKeySize()| bytes long.
+ void SetKey(base::StringPiece key);
// Box encrypts |plaintext| using a random nonce generated from |rand| and
// returns the resulting ciphertext. Since an authenticator and nonce are
@@ -49,8 +43,7 @@ class NET_EXPORT_PRIVATE CryptoSecretBoxer {
base::StringPiece* out) const;
private:
- scoped_ptr<QuicEncrypter> encrypter_;
- scoped_ptr<QuicDecrypter> decrypter_;
+ std::string key_;
DISALLOW_COPY_AND_ASSIGN(CryptoSecretBoxer);
ramant (doing other things) 2014/04/29 00:41:49 Will merge this line into internal source tree.
};
« no previous file with comments | « no previous file | net/quic/crypto/crypto_secret_boxer.cc » ('j') | net/quic/crypto/crypto_secret_boxer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698