SQL 2005 MD5 Hash and C# MD5 Hash
问题 I currently have a legacy database (SQL 2005) that generates hash strings for tokens. It does it like this... DECLARE @RowID INT DECLARE @hashString VARCHAR(128) SET @RowID = 12345 SET @salt= 0xD2779428A5328AF9 SET @hashBinary = HASHBYTES(('MD5', @salt + CAST(@RowID AS VARBINARY(30))) SET @hashString = sys.fn_varbintohexstr(@hashBinary) If I execute this, I my hash string looks like this: "0x69a947fd71b853485007f0d0be0763a5" Now, I need to replicate the same logic in C# so I can remove the