Searched refs:calc (Results 1 – 3 of 3) sorted by relevance
52 HashCalculator calc; in TEST_F() local53 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() local63 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 …]
92 HashCalculator calc; in RawHashOfBytes() local93 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() local107 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() local120 calc.Update(data, length); in HashOfBytes()[all …]
199 HashCalculator calc; in CalculateHashFromPayload() local200 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()