One way hash functions
How to use One way hash functions in T-SQL (Microsoft SQL) for Has开发者_开发问答h data ?
Straight from the manual, with examples:
http://msdn.microsoft.com/en-us/library/ms174415.aspx
From SQL Server 2005 and on, HASHBYTES is a built in function which can deal with MD2, MD4, MD5, SHA and SHA1. Example:
SELECT HASHBYTES('MD5', 'foo');
Note that the input should be a varchar, nvarchar or a varbinary. This blogpost highlights some of the caveeats when using HASHBYTES with columns such as char/nchar.
精彩评论