Lines Matching refs:size
55 if (hex.size() % 2 != 0) { in HexToBytes()
58 bytes->resize(hex.size() / 2); in HexToBytes()
59 for (unsigned i = 0; i < bytes->size(); i++) { in HexToBytes()
82 virtual bool CalculateDigest(const void *buffer, size_t size,
108 bool CalculateDigest(const void *buffer, size_t size, const void *salt, in CalculateDigest() argument
117 if (update_func_(&ctx, buffer, size) != 1) { in CalculateDigest()
146 static bool CalculateZeroDigest(const ShaHasher &hasher, size_t size, in CalculateZeroDigest() argument
149 const std::vector<uint8_t> buffer(size, 0); in CalculateZeroDigest()
150 return hasher.CalculateDigest(buffer.data(), size, salt, block_length, in CalculateZeroDigest()
266 if (!CalculateZeroDigest(hasher, data_block_size, salt.data(), salt.size(), in VerifyHashtree()
276 pread64(image_fd, data_block.data(), data_block.size(), image_offset)); in VerifyHashtree()
277 if (read_size != data_block.size()) { in VerifyHashtree()
283 bool is_last_data = (image_offset + data_block.size() == image_size); in VerifyHashtree()
289 if (!hasher.CalculateDigest(current_block->data(), current_block->size(), in VerifyHashtree()
290 salt.data(), salt.size(), current_digest)) { in VerifyHashtree()
305 level->calculating_hash_block.size() - level->calculating_offset); in VerifyHashtree()
307 level->calculating_hash_block.size()) { in VerifyHashtree()
318 pread64(image_fd, tree_block.data(), tree_block.size(), in VerifyHashtree()
320 if (read_size != tree_block.size()) { in VerifyHashtree()
326 for (uint32_t offset = 0; offset < tree_block.size(); in VerifyHashtree()
514 ASSERT_EQ(expected_digest.size(), hasher->GetDigestSize()); in TEST()
528 ASSERT_TRUE(out_digest.size() == expected_digest.size()) in TEST()
568 ASSERT_EQ(expected_digest.size(), hasher->GetDigestSize()); in TEST()
602 *pos = str.size(); in NextWord()
629 ASSERT_EQ(table.size(), 1); in TEST()