Sunday, December 26, 2010

How to encrypt and decrypt password in SQL Server

Here you can find nice and full solution to encrypt and decrypt password for use in SQL Server.

Using:
declare @value VARCHAR(8000)
--Encrypt
set @value =  dbo.fnEncDecRc4('Magic Word','password')
--Decrypt
select dbo.fnEncDecRc4('Magic Word',@value)
Enjoy!

No comments: