| Index: omaha_hash_calculator.cc
|
| diff --git a/omaha_hash_calculator.cc b/omaha_hash_calculator.cc
|
| index fdc70f01990ad136238efc99042d7b86f008e076..ac4edf480d6589846192cd70318a538a76fa2f8e 100644
|
| --- a/omaha_hash_calculator.cc
|
| +++ b/omaha_hash_calculator.cc
|
| @@ -113,6 +113,20 @@ bool OmahaHashCalculator::RawHashOfData(const vector<char>& data,
|
| return true;
|
| }
|
|
|
| +off_t OmahaHashCalculator::RawHashOfFile(const std::string& name, off_t length,
|
| + std::vector<char>* out_hash) {
|
| + OmahaHashCalculator calc;
|
| + off_t res = calc.UpdateFile(name, length);
|
| + if (res < 0) {
|
| + return res;
|
| + }
|
| + if (!calc.Finalize()) {
|
| + return -1;
|
| + }
|
| + *out_hash = calc.raw_hash();
|
| + return res;
|
| +}
|
| +
|
| string OmahaHashCalculator::OmahaHashOfBytes(
|
| const void* data, size_t length) {
|
| OmahaHashCalculator calc;
|
|
|