Search code examples
filechecksum

If I replace a character in a text file with the same character, does the Checksum change?


Say you have a text file with the only contents being plain text and CR, LF, etc. If you replace one of those characters with the same exact character. Will this result in a new Checksum?


Solution

  • No.

    According to google a checksum is:

    a digit representing the sum of the correct digits in a piece of stored or transmitted digital data, against which later comparisons can be made to detect errors in the data.

    An easy way to verify this would be to use a checksum calculater like the one found here: http://www.online-tech-tips.com/cool-websites/what-is-checksum/ and then conduct the experiment by actually replacing a character with the same character.

    The case where it might seem like it does change the checksum is when visually similar but actually different characters are used, ie: tabs vs spaces.