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

Unified Diff: omaha_hash_calculator.h

Issue 3592008: AU: Verify delta payload signature and signed hash. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git
Patch Set: move /tmp files to /var/run Created 10 years, 2 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 | « download_action.cc ('k') | omaha_hash_calculator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: omaha_hash_calculator.h
diff --git a/omaha_hash_calculator.h b/omaha_hash_calculator.h
index 208fd01e6acddf2629c6d96b6795db9ca68cf1e5..52ac1b75fd5a9227195bb9f535f5a19513a92f35 100644
--- a/omaha_hash_calculator.h
+++ b/omaha_hash_calculator.h
@@ -40,6 +40,11 @@ class OmahaHashCalculator {
return hash_;
}
+ const std::vector<char>& raw_hash() const {
+ DCHECK(!raw_hash_.empty()) << "Call Finalize() first";
+ return raw_hash_;
+ }
+
static bool RawHashOfData(const std::vector<char>& data,
std::vector<char>* out_hash);
@@ -49,9 +54,10 @@ class OmahaHashCalculator {
static std::string OmahaHashOfData(const std::vector<char>& data);
private:
- // If non-empty, the final base64 encoded hash. Will only be set to
- // non-empty when Finalize is called.
+ // If non-empty, the final base64 encoded hash and the raw hash. Will only be
+ // set to non-empty when Finalize is called.
std::string hash_;
+ std::vector<char> raw_hash_;
// Init success
bool valid_;
« no previous file with comments | « download_action.cc ('k') | omaha_hash_calculator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698