开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜