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

Side by Side Diff: src/platform/update_engine/omaha_hash_calculator.h

Issue 466036: AU: Beginnings of delta support (Closed)
Patch Set: Created 11 years 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2009 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UPDATE_ENGINE_OMAHA_HASH_CALCULATOR_H__ 5 #ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_OMAHA_HASH_CALCULATOR_H__
6 #define UPDATE_ENGINE_OMAHA_HASH_CALCULATOR_H__ 6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_OMAHA_HASH_CALCULATOR_H__
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include <string> 9 #include <string>
10 #include <vector>
10 #include <openssl/sha.h> 11 #include <openssl/sha.h>
11 12
12 // Omaha uses base64 encoded SHA-1 as the hash. This class provides a simple 13 // Omaha uses base64 encoded SHA-1 as the hash. This class provides a simple
13 // wrapper around OpenSSL providing such a formatted hash of data passed in. 14 // wrapper around OpenSSL providing such a formatted hash of data passed in.
14 // The methods of this class must be called in a very specific order: 15 // The methods of this class must be called in a very specific order:
15 // First the ctor (of course), then 0 or more calls to Update(), then 16 // First the ctor (of course), then 0 or more calls to Update(), then
16 // Finalize(), then 0 or more calls to hash(). 17 // Finalize(), then 0 or more calls to hash().
17 18
18 namespace chromeos_update_engine { 19 namespace chromeos_update_engine {
19 20
(...skipping 26 matching lines...) Expand all
46 // non-empty when Finalize is called. 47 // non-empty when Finalize is called.
47 std::string hash_; 48 std::string hash_;
48 49
49 // The hash state used by OpenSSL 50 // The hash state used by OpenSSL
50 SHA_CTX ctx_; 51 SHA_CTX ctx_;
51 DISALLOW_COPY_AND_ASSIGN(OmahaHashCalculator); 52 DISALLOW_COPY_AND_ASSIGN(OmahaHashCalculator);
52 }; 53 };
53 54
54 } // namespace chromeos_update_engine 55 } // namespace chromeos_update_engine
55 56
56 #endif // UPDATE_ENGINE_OMAHA_HASH_CALCULATOR_H__ 57 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_OMAHA_HASH_CALCULATOR_H__
OLDNEW
« no previous file with comments | « src/platform/update_engine/mock_http_fetcher.cc ('k') | src/platform/update_engine/omaha_hash_calculator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698