Lines Matching refs:size
54 if (hex.size() % 2 != 0) { in HexToBytes()
57 bytes->resize(hex.size() / 2); in HexToBytes()
58 for (unsigned i = 0; i < bytes->size(); i++) { in HexToBytes()
81 virtual bool CalculateDigest(const void *buffer, size_t size,
107 bool CalculateDigest(const void *buffer, size_t size, const void *salt, in CalculateDigest() argument
116 if (update_func_(&ctx, buffer, size) != 1) { in CalculateDigest()
145 static bool CalculateZeroDigest(const ShaHasher &hasher, size_t size, in CalculateZeroDigest() argument
148 const std::vector<uint8_t> buffer(size, 0); in CalculateZeroDigest()
149 return hasher.CalculateDigest(buffer.data(), size, salt, block_length, in CalculateZeroDigest()
265 if (!CalculateZeroDigest(hasher, data_block_size, salt.data(), salt.size(), in VerifyHashtree()
275 pread64(image_fd, data_block.data(), data_block.size(), image_offset)); in VerifyHashtree()
276 if (read_size != data_block.size()) { in VerifyHashtree()
282 bool is_last_data = (image_offset + data_block.size() == image_size); in VerifyHashtree()
288 if (!hasher.CalculateDigest(current_block->data(), current_block->size(), in VerifyHashtree()
289 salt.data(), salt.size(), current_digest)) { in VerifyHashtree()
304 level->calculating_hash_block.size() - level->calculating_offset); in VerifyHashtree()
306 level->calculating_hash_block.size()) { in VerifyHashtree()
317 pread64(image_fd, tree_block.data(), tree_block.size(), in VerifyHashtree()
319 if (read_size != tree_block.size()) { in VerifyHashtree()
325 for (uint32_t offset = 0; offset < tree_block.size(); in VerifyHashtree()
477 ASSERT_EQ(expected_digest.size(), hasher->GetDigestSize()); in TEST()
511 *pos = str.size(); in NextWord()
541 ASSERT_EQ(table.size(), 1); in TEST()