Input Value:
specifies a variable containing the data to be hashed.input is varchar, nvarchar, or varbinary.
Output Value:
the output conforms to the algorithm standard formate:
MD2,MD4,MD5,SHA,SHA1,SHA2_256,SHA2_512.
Example of SHA2_512 hash of the nvarchar data stored in variable @HASHDATA:
DECLARE @HASHDATA NVARCHAR(MAX);
SET @HASHDATA = 'HELLO WEB DEVELOPER IN THE WORLD';
SELECT HASHBYTES('SHA2_512', @HASHDATA);
Here is the result set:
0x7DE15151CE708368B18D6A49B188A60C455E3814324F5AFCE878A342C7BDAA8A2FE3FDCAD9DC65F951557B8132799DFB9CB888F5026C53DD5F60C7EB203C8E1A
specifies a variable containing the data to be hashed.input is varchar, nvarchar, or varbinary.
Output Value:
the output conforms to the algorithm standard formate:
MD2,MD4,MD5,SHA,SHA1,SHA2_256,SHA2_512.
Example of SHA2_512 hash of the nvarchar data stored in variable @HASHDATA:
DECLARE @HASHDATA NVARCHAR(MAX);
SET @HASHDATA = 'HELLO WEB DEVELOPER IN THE WORLD';
SELECT HASHBYTES('SHA2_512', @HASHDATA);
Here is the result set:
0x7DE15151CE708368B18D6A49B188A60C455E3814324F5AFCE878A342C7BDAA8A2FE3FDCAD9DC65F951557B8132799DFB9CB888F5026C53DD5F60C7EB203C8E1A
0 Comments
if you have any doubts , please let me know