Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Inbuilt function for string encryption

Author  Topic 

nicky_river
Yak Posting Veteran

55 Posts

Posted - 2010-08-09 : 01:27:56
Hi,

What is the inbuilt function in SQL Server 2008 for string encryption.

vaibhavktiwari83
Aged Yak Warrior

843 Posts

Posted - 2010-08-09 : 04:21:01
[code]
declare @res varbinary(8000), @str VARCHAR(100), @dec_str varchar(100)
SET @str = 'vaibhav'
set @res = EncryptByPassPhrase ('SQL SERVER 2008',@str)
SELECT @res
SET @dec_str = DecryptByPassPhrase('SQL SERVER 2008', @res )
SELECT @dec_str
[/code]


Vaibhav T

To walk FAST walk ALONE
To walk FAR walk TOGETHER
Go to Top of Page
   

- Advertisement -