利用MSSQL sp自制未公开的加密函数,利用MSSQL sp自制未公开的加密函数
【 tulaoshi.com - SQLServer 】
Microsoft SQL Server是如何加密口令的?如何自制未公开的加密函数?DECLARE @ClearPWD varchar(255)
DECLARE @EncryptedPWD varbinary(255)
SELECT @ClearPWD = 'test'
SELECT @EncryptedPWD = CONVERT(varbinary(255), pwdencrypt(@ClearPWD))
SELECT @EncryptedPWD
pwdcompare(@old, password, (CASE WHEN xstatus&2048 = 2048 THEN 1 ELSE 0 END))
(本文来源于图老师网站,更多请访问http://www.tulaoshi.com/sqlserver/)DECLARE @ClearPWD varchar(255)
DECLARE @EncryptedPWD varbinary(255)
SELECT @ClearPWD = 'test'
SELECT @EncryptedPWD = CONVERT(varbinary(255), pwdencrypt(@ClearPWD))
SELECT pwdcompare(@ClearPWD, @EncryptedPWD, 0)
SELECT pwdcompare('ErrorPassword', @EncryptedPWD, 0)
来源:http://www.tulaoshi.com/n/20160129/1499495.html
看过《利用MSSQL sp自制未公开的加密函数》的人还看了以下文章 更多>>