diff options
Diffstat (limited to 'chrome/browser/sync/util')
-rw-r--r-- | chrome/browser/sync/util/crypto_helpers.cc | 4 | ||||
-rw-r--r-- | chrome/browser/sync/util/crypto_helpers.h | 4 | ||||
-rw-r--r-- | chrome/browser/sync/util/cryptographer.cc | 2 | ||||
-rw-r--r-- | chrome/browser/sync/util/cryptographer.h | 1 |
4 files changed, 8 insertions, 3 deletions
diff --git a/chrome/browser/sync/util/crypto_helpers.cc b/chrome/browser/sync/util/crypto_helpers.cc index b01e01f..9315d8b 100644 --- a/chrome/browser/sync/util/crypto_helpers.cc +++ b/chrome/browser/sync/util/crypto_helpers.cc @@ -21,6 +21,8 @@ MD5Calculator::MD5Calculator() { MD5Init(&context_); } +MD5Calculator::~MD5Calculator() {} + void MD5Calculator::AddData(const unsigned char* data, int length) { CHECK(bin_digest_.empty()); MD5Update(&context_, data, length); @@ -34,7 +36,7 @@ void MD5Calculator::CalcDigest() { } } -vector<uint8> MD5Calculator::GetDigest() { +const vector<uint8>& MD5Calculator::GetDigest() { CalcDigest(); return bin_digest_; } diff --git a/chrome/browser/sync/util/crypto_helpers.h b/chrome/browser/sync/util/crypto_helpers.h index 5660447..34b36f4 100644 --- a/chrome/browser/sync/util/crypto_helpers.h +++ b/chrome/browser/sync/util/crypto_helpers.h @@ -22,13 +22,13 @@ class MD5Calculator { void CalcDigest(); public: MD5Calculator(); - ~MD5Calculator() {} + ~MD5Calculator(); void AddData(const uint8* data, int length); void AddData(const char* data, int length) { AddData(reinterpret_cast<const uint8*>(data), length); } std::string GetHexDigest(); - std::vector<uint8> GetDigest(); + const std::vector<uint8>& GetDigest(); private: DISALLOW_COPY_AND_ASSIGN(MD5Calculator); }; diff --git a/chrome/browser/sync/util/cryptographer.cc b/chrome/browser/sync/util/cryptographer.cc index 2a3701e..747b094 100644 --- a/chrome/browser/sync/util/cryptographer.cc +++ b/chrome/browser/sync/util/cryptographer.cc @@ -19,6 +19,8 @@ const char kNigoriKeyName[] = "nigori-key"; Cryptographer::Cryptographer() : default_nigori_(NULL) { } +Cryptographer::~Cryptographer() {} + void Cryptographer::Bootstrap(const std::string& restored_bootstrap_token) { if (is_ready()) { NOTREACHED(); diff --git a/chrome/browser/sync/util/cryptographer.h b/chrome/browser/sync/util/cryptographer.h index 230ed94..ada084cc 100644 --- a/chrome/browser/sync/util/cryptographer.h +++ b/chrome/browser/sync/util/cryptographer.h @@ -43,6 +43,7 @@ struct KeyParams { class Cryptographer { public: Cryptographer(); + ~Cryptographer(); // |restored_bootstrap_token| can be provided via this method to bootstrap // Cryptographer instance into the ready state (is_ready will be true). |