Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HashAlgorithm implementation

I'm in need of a hash function for checking some file versioning (Basically, checking if client side file is the same as server side one).

My problem is that there is half a dozen implementations of HashAlgorithm, in the .net library, and I'm a bit lost.

  • System.Security.Cryptography.KeyedHashAlgorithm
  • System.Security.Cryptography.MD5
  • System.Security.Cryptography.RIPEMD160
  • System.Security.Cryptography.SHA1
  • System.Security.Cryptography.SHA256
  • System.Security.Cryptography.SHA384
  • System.Security.Cryptography.SHA512

I'm looking for a fast algorithm, with relatively short output size. Security is not really a matter here.

Thanks!

like image 203
Nicolas Repiquet Avatar asked Mar 10 '26 00:03

Nicolas Repiquet


1 Answers

Since it isn't a security issue, MD5 will probably serve your purposes. It is pretty standard for file content hashing.

like image 129
Chris Shain Avatar answered Mar 12 '26 17:03

Chris Shain