Search code examples
c#sql-serverchecksum

SqlServer Checksum in C#


I'm using the checksum function in SQL Server 2008 R2, and I would like to get the same int values in a C# app.

Is there any equivalent method in C# that returns the same values as the SQL checksum function?


Solution

  • CHECKSUM docs don't disclose how it computes the hash. If you want a hash you can use in T-SQL and C#, pick from the algorithms supported in HashBytes