A quick and dirty implementation of the algorithm described in this reddit comment
The algorithm works as follows:
- Start with a xorsum of 32 nullbytes
- Begin enumerating files in a given directory
- Open the file and hash
<filename>\0<contents>
using SHA256 xorsum=xorsum XOR hash
- If the directory contains more files, go to step 2
- Done.
xorsum
contains a sort order independent, combined hash of all files.