Using HASHBYTES Generate HASH string :
HASHBYTES ( '<algorithm>', { @input | 'input' } ) <algorithm>::= MD2 | MD4 | MD5 | SHA | SHA1 | SHA2_256 | SHA2_512
Algorithm MD5:
SELECT CONVERT(VARCHAR(32), HashBytes('MD5', 'code-lake@blogspot.com'),2)
SELECT CONVERT(VARCHAR(32), HashBytes('MD5', 'code-lake@blogspot.com'),2)
Output: 7A598B534FD42DF41F7725CAAD261DCB
Algorithm SHA1:
SELECT CONVERT(VARCHAR(32), HashBytes('SHA1', 'code-lake@blogspot.com'),2)
SELECT CONVERT(VARCHAR(32), HashBytes('SHA1', 'code-lake@blogspot.com'),2)
Output: 7141CCD5A09B915B8541D4E4C3DCD108
Reference: MSDN
Comments
Post a Comment