SQL
Topic: Encrypt a string in SQL Server 2000 - Undocumented Procs

Ireland .NET Developer Alliance :: Forums

Page 1 of 1 (2 items)

Posted by Paschal on

While reading through some blogs this morning, I found out that you can encrypt inside SQL Server .

This is an alternative solution to encrypting passwords which I wrote a security component to do a while back.  Sample code provided from the original post below:

DECLARE @ClearPIN varchar(255)
DECLARE @EncryptedPIN varbinary(255)
SELECT @ClearPIN = 'test'
SELECT @EncryptedPIN = CONVERT(varbinary(255), pwdencrypt(@ClearPIN))
SELECT pwdcompare(@ClearPIN, @EncryptedPIN, 0)

 


Posted by ray on

 

It is worth taking a look at this article before choosing SQL Server Encryption:

 

On second thoughts, go find the article yourselves...