Home
last modified time | relevance | path

Searched refs:calc (Results 1 – 3 of 3) sorted by relevance

/system/update_engine/common/
Dhash_calculator_unittest.cc52 HashCalculator calc; in TEST_F() local
53 calc.Update("hi", 2); in TEST_F()
54 calc.Finalize(); in TEST_F()
55 EXPECT_EQ(kExpectedHash, calc.hash()); in TEST_F()
58 EXPECT_TRUE(raw_hash == calc.raw_hash()); in TEST_F()
62 HashCalculator calc; in TEST_F() local
63 calc.Update("h", 1); in TEST_F()
64 calc.Update("i", 1); in TEST_F()
65 calc.Finalize(); in TEST_F()
66 EXPECT_EQ(kExpectedHash, calc.hash()); in TEST_F()
[all …]
Dhash_calculator.cc92 HashCalculator calc; in RawHashOfBytes() local
93 TEST_AND_RETURN_FALSE(calc.Update(data, length)); in RawHashOfBytes()
94 TEST_AND_RETURN_FALSE(calc.Finalize()); in RawHashOfBytes()
95 *out_hash = calc.raw_hash(); in RawHashOfBytes()
106 HashCalculator calc; in RawHashOfFile() local
107 off_t res = calc.UpdateFile(name, length); in RawHashOfFile()
111 if (!calc.Finalize()) { in RawHashOfFile()
114 *out_hash = calc.raw_hash(); in RawHashOfFile()
119 HashCalculator calc; in HashOfBytes() local
120 calc.Update(data, length); in HashOfBytes()
[all …]
/system/update_engine/payload_generator/
Dpayload_signer.cc199 HashCalculator calc; in CalculateHashFromPayload() local
200 TEST_AND_RETURN_FALSE(calc.Update(payload.data(), metadata_size)); in CalculateHashFromPayload()
203 TEST_AND_RETURN_FALSE(calc.Update( in CalculateHashFromPayload()
206 TEST_AND_RETURN_FALSE(calc.Finalize()); in CalculateHashFromPayload()
207 *out_hash_data = calc.raw_hash(); in CalculateHashFromPayload()