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

  • Thread starter Thread starter Jayesh Sorathia
  • Start date Start date
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
 
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
 
Back
Top