.Net Tips , C# Tip : Check file contents is changed using calculateand comparing hash code of a file

J

Jayesh Sorathia

Hash code of a file is useful for check that file contents is changed over the time or not.
First time you calculate hash code of a file and store , after some time period you again calculate hash code of a file and compare with stored hash code, If hash code is changed that means contents of the file is changed.

You can create a cryptographic hash code of the file using the ComputeHash method of the System.Security.Cryptography.HashAlgorithm class.

To view full article visit this link. Link... http://jayeshsorathia.blogspot.com/2012/07/net-tips-c-tip-check-file-contents-is.html
 
A

Arne Vajhøj

Hash code of a file is useful for check that file contents is changed over the time or not.
First time you calculate hash code of a file and store , after some time period you again calculate hash code of a file and compare with stored hash code, If hash code is changed that means contents of the file is changed.

You can create a cryptographic hash code of the file using the ComputeHash method of the System.Security.Cryptography.HashAlgorithm class.

To view full article visit this link.

Response.Write is still not good ASP.NET.

And both MD-5 and SHA-1 are obsolete today.

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top