반응형
암호화
update users set LoginPwd=pwdencrypt('passwd12') where id=3
DECLARE @ClearPIN varchar(255)
DECLARE @EncryptedPIN2 varchar(255)
DECLARE @EncryptedPIN varbinary(255)
SELECT @ClearPIN = 'passwd12'
SELECT @EncryptedPIN2 = LoginPwd from users where id=3
SELECT @EncryptedPIN = CONVERT(varbinary(255), @EncryptedPIN2)
SELECT pwdcompare(@ClearPIN, @EncryptedPIN, 0)
암호가 맞으면 1을 리턴
틀리면 0 리턴
반응형