AU: When applying delta locally, get source checksums
When applying a delta on the host, we need to calculate the original
checksums for the rootfs/kernel for the delta performer. This CL does
that.
Also:
- Log old/new checksums in performer
- Add base64 encode function to OmahaHashCalculator
BUG=8062
TEST=unittests; applied delta on host
Review URL: http://codereview.chromium.org/4042004
Change-Id: I953d7dd34cb65269e9b44e22c87a13a7f52e66d4
diff --git a/omaha_hash_calculator.h b/omaha_hash_calculator.h
index dc9fe4e..762b8d4 100644
--- a/omaha_hash_calculator.h
+++ b/omaha_hash_calculator.h
@@ -70,6 +70,8 @@
static std::string OmahaHashOfString(const std::string& str);
static std::string OmahaHashOfData(const std::vector<char>& data);
+ static bool Base64Encode(const void* data, size_t size, std::string* out);
+
private:
// If non-empty, the final base64 encoded hash and the raw hash. Will only be
// set to non-empty when Finalize is called.