Groups | Blog | Home
all groups > sql server programming > august 2003 >

sql server programming : SQL Server 2000 Enryption and Decryption Capability


konay
8/25/2003 9:51:56 PM
Does SQL Server support Encryption and Decryption of
Vishal Parkar
8/25/2003 10:09:57 PM
No,
But there are 2 undocumented password encryption function
pwdencrypt/pwdcompare by which you can encrypt and
decrypt a string.

Following is the example.

declare @x varbinary(500)
declare @ret int
select @x=convert(varbinary(500),pwdencrypt('check'))
select pwdcompare('check',@x, 0)

You can use pwdencrypt in a update/insert trigger to
encrypt the values of a table's column. While decrypting
you'll have to use pwdcompare which will return 0 or 1 on
the basis of failed or successfull comparison
respectively.

for more information visit
http://www.sqlmag.com/Articles/Index.cfm?ArticleID=9809

since these functions are undocumented i wont suggest you
using them. you may go for third party encryption, visit
following url

http://www.activecrypt.com/faq.htm

- Vishal
[quoted text, click to view]
oj
8/25/2003 10:12:23 PM
There is no such built-in functionality. You have to implement it yourself
or use thirdparty www.netlib.com

--
-oj
Rac v2.2 & QALite!
http://www.rac4sql.net


[quoted text, click to view]

Steve Kass
8/26/2003 1:40:10 AM
Just to add another caveat to Vishal's not suggesting you use these
undocumented functions, anyone considering them should also
take a look here:

http://packetstormsecurity.nl/papers/authentication/cracking-sql-passwords.pdf

-- Steve Kass
-- Drew University
-- Ref: 8C7E85AB-40F2-4914-BD66-E99487AD8DDF

[quoted text, click to view]
AddThis Social Bookmark Button