I want to figure out if given a set of files, if there happened to be a change in any of those files.
I know for a single file you can use this approach which gets a checksum value that you can use to check if a change happened. I.e. This returns same value for a given file until something is changed in that file then it'll generate a different hash:
byte[] hashBytes;
using(var inputFileStream = File.Open(filePath))
{
var md5 = MD5.Create();
hashBytes = md5.ComputeHash(inputFileStream);
}
string s = Convert.ToBase64String(hashBytes);
Is there a way to get a collection of hash values and get a hash from that collection?
List<byte[]> hashCollection = SomeFunctionThatReturnsListByteArray();
//some approach that can create a hash of this
My main goal is to detect if a change happened. I don't care which file changed.