开发者

One way hash functions

开发者 https://www.devze.com 2023-02-09 12:33 出处:网络
How to use One way hash functions in T-SQL (Microsoft SQL) for Has开发者_开发问答h data ?Straight from the manual, with examples:

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

精彩评论

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