4 ms·
Updating the checksum is possible by calculating the CRC of the modified bytes at the proper byte offset before and after modification. Then applying: checksum
by mungoman2 4y ago
Updating the checksum is possible by calculating the CRC of the modified bytes at the proper byte offset before and after modification.
Then applying:
checksum ^= crc_of_removed_bytes
checksum ^= crc_of_added_bytes
- rwmj 4y agoThanks! I thought there would be a way something like this. To be honest the tool as posted is just a hack to demonstrate the point that it is possible. I have an idea for a somewhat more refined tool which would let you mark small stretches of data (not whole partitions) for modification, and provide additional tooling to do the mods and update the checksums. As well as implementing the whole thing again for xz & zstd, which is another large chunk of work.