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

Side by Side Diff: omaha_hash_calculator.h

Issue 3419018: AU: Switch from SHA-1 to SHA-256 hash. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git
Patch Set: update unit test 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | omaha_hash_calculator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 CHROMEOS_PLATFORM_UPDATE_ENGINE_OMAHA_HASH_CALCULATOR_H__ 5 #ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_OMAHA_HASH_CALCULATOR_H__
6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_OMAHA_HASH_CALCULATOR_H__ 6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_OMAHA_HASH_CALCULATOR_H__
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 #include <openssl/sha.h> 10 #include <openssl/sha.h>
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 private: 51 private:
52 // If non-empty, the final base64 encoded hash. Will only be set to 52 // If non-empty, the final base64 encoded hash. Will only be set to
53 // non-empty when Finalize is called. 53 // non-empty when Finalize is called.
54 std::string hash_; 54 std::string hash_;
55 55
56 // Init success 56 // Init success
57 bool valid_; 57 bool valid_;
58 58
59 // The hash state used by OpenSSL 59 // The hash state used by OpenSSL
60 SHA_CTX ctx_; 60 SHA256_CTX ctx_;
61 DISALLOW_COPY_AND_ASSIGN(OmahaHashCalculator); 61 DISALLOW_COPY_AND_ASSIGN(OmahaHashCalculator);
62 }; 62 };
63 63
64 } // namespace chromeos_update_engine 64 } // namespace chromeos_update_engine
65 65
66 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_OMAHA_HASH_CALCULATOR_H__ 66 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_OMAHA_HASH_CALCULATOR_H__
OLDNEW
« no previous file with comments | « no previous file | omaha_hash_calculator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698