Searched refs:calc (Results 1 – 3 of 3) sorted by relevance
48 HashCalculator calc; in TEST_F() local49 calc.Update("hi", 2); in TEST_F()50 calc.Finalize(); in TEST_F()53 EXPECT_EQ(raw_hash, calc.raw_hash()); in TEST_F()57 HashCalculator calc; in TEST_F() local58 calc.Update("h", 1); in TEST_F()59 calc.Update("i", 1); in TEST_F()60 calc.Finalize(); in TEST_F()63 EXPECT_EQ(raw_hash, calc.raw_hash()); in TEST_F()67 HashCalculator calc; in TEST_F() local[all …]
86 HashCalculator calc; in RawHashOfBytes() local87 TEST_AND_RETURN_FALSE(calc.Update(data, length)); in RawHashOfBytes()88 TEST_AND_RETURN_FALSE(calc.Finalize()); in RawHashOfBytes()89 *out_hash = calc.raw_hash(); in RawHashOfBytes()101 HashCalculator calc; in RawHashOfFile() local102 off_t res = calc.UpdateFile(name, length); in RawHashOfFile()106 if (!calc.Finalize()) { in RawHashOfFile()109 *out_hash = calc.raw_hash(); in RawHashOfFile()
197 HashCalculator calc; in CalculateHashFromPayload() local198 TEST_AND_RETURN_FALSE(calc.Update(payload.data(), metadata_size)); in CalculateHashFromPayload()201 TEST_AND_RETURN_FALSE(calc.Update( in CalculateHashFromPayload()204 TEST_AND_RETURN_FALSE(calc.Finalize()); in CalculateHashFromPayload()205 *out_hash_data = calc.raw_hash(); in CalculateHashFromPayload()