How to obtain the checksum for the folder?

Good day! please tell me any quick example to calculate the checksum in c# for the folder. Try to take a checksum for files inside the folders but as files a lot of time takes a lot. Is there any quick way to know the checksum of an entire folder at once, that would be quick to compare it with known and, if necessary, then convert the files.
April 4th 20 at 13:27
2 answers
April 4th 20 at 13:29
All depends on the "uniqueness" of folders.
You can suggest the following method:
Take the file names, their sizes and modification dates.
Sort them by file name.
Put in a single file/string and I think the hash.
This will work under certain assumptions: that you have no attacker that submenu the contents of files without changing their size and date modified.
I think it will be the best option, thanks - seamus commented on April 4th 20 at 13:32
April 4th 20 at 13:31
1. nothing to do with wpf, especially in mvvm)
2. every effort seems to focus on optimizing the speed of a checksum calculation of the file.

Find more questions by tags WPFC#