Basic Checksum

by Ricardo Fernández Serrata

Version 1 (March 7, 2021)

Download (7 downloads)

Based on the XOR cipher, with custom digest size (you can specify the size you want).

The hex string used to initialize the {state} var is the IV (Initialization Vector). The For Each isn't iterating directly over the data to hash because that would create a copy that uses more memory, so I just used the length of the data to define the iteration limit.

This is NOT cryptographically secure, this is just to verify integrity of files. The digest could leak some information about the hashed data. The default IV is the SHA-512 digest of a low entropy string. The input can be easily altered to yield any wanted digest.

This algorithm has better security when the digest size is smaller and/or the file is bigger, because of better "mixing" of the data, but a small digest size has higher collision probability

3.0 average rating from 1 reviews

5 stars
4 stars
3 stars
2 stars
1 star

Reviews and ratings can be submitted in the app.