OLD | NEW |
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 Loading... |
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__ |
OLD | NEW |