I have the special character ™ that I am trying to convert to a MD5 hash. The expected hash result should be dbe87324ccfa4dfda26dad01688b3232. The results I am getting are unexpected to say the least. The below queries tries to yield results for both VARCHAR
and NVARCHAR
text.
SELECT CONVERT(VARCHAR(32), HASHBYTES('MD5', N'™'), 2) -- 254C54912C4A445697823E7D1AC70EA2
SELECT CONVERT(VARCHAR(32), HASHBYTES('MD5', '™'), 2) -- 6D4A60F6F35FB2CEDA4DF4FE58B2C9BE