I’m computing the SHA-512 hash of a very large file using System.Security.Cryptography.SHA512Cng.ComputeHash, and I’d like to show a progress bar for it. How can I check the completion of the method without reimplementing the algorithm?
I’m computing the SHA-512 hash of a very large file using System.Security.Cryptography.SHA512Cng.ComputeHash , and
Share
You can subclass
Stream! Here’s aProgressStreamthat reads from a file:Just handle the
ProgressChangedevent.The same method applies to all other types of streams, and you can also use it for certain other long-running tasks that read a file as required instead of all at once.