• Home
  • Raw
  • Download

Lines Matching full:checksum

87              .checksum = 0,  in Entry()
94 std::span<const byte> checksum = CalculateChecksum(key, value); local
95 std::memcpy(&header_.checksum,
96 checksum.data(),
97 std::min(checksum.size(), sizeof(header_.checksum)));
112 checksum_algo_ = new_format.checksum; in Update()
120 // header size, we first read the entire value to calculate the new checksum, in Update()
191 return header_.checksum == 0 ? OkStatus() : Status::DataLoss(); in VerifyChecksum()
210 // Read the first chunk, which includes the header, and compare the checksum. in VerifyChecksumInFlash()
213 if (header_to_verify.checksum != header_.checksum) { in VerifyChecksumInFlash()
214 PW_LOG_ERROR("Expected checksum 0x%08" PRIx32 ", found 0x%08" PRIx32, in VerifyChecksumInFlash()
215 header_.checksum, in VerifyChecksumInFlash()
216 header_to_verify.checksum); in VerifyChecksumInFlash()
221 return header_.checksum == 0 ? OkStatus() : Status::DataLoss(); in VerifyChecksumInFlash()
224 // The checksum is calculated as if the header's checksum field were 0. in VerifyChecksumInFlash()
225 header_to_verify.checksum = 0; in VerifyChecksumInFlash()
230 // Add the chunk in the buffer to the checksum. in VerifyChecksumInFlash()
253 PW_LOG_DEBUG(" Checksum = 0x%x", unsigned(header_.checksum)); in DebugLog()
266 header_for_checksum.checksum = 0; in CalculateChecksum()
279 header_.checksum = 0; in CalculateChecksumFromFlash()
304 std::span checksum = checksum_algo_->Finish(); in CalculateChecksumFromFlash() local
305 std::memcpy(&header_.checksum, in CalculateChecksumFromFlash()
306 checksum.data(), in CalculateChecksumFromFlash()
307 std::min(checksum.size(), sizeof(header_.checksum))); in CalculateChecksumFromFlash()