> there are undocumented functions pwdencrypt and pwdcompare in SQL 2000. ;)
between service packs/versions. I wouldn't go there ;-)
If you are using SQL 2000, you can do the encryption and decryption in the
middle tier and send the encrypted password into SQL Server as binary.
vt stated that SQL 2005 has simple symmetric encryption, which isn't the
whole story. As Hari already noted, if you are using SQL 2005, you can do
symmetric and asymmetric encryption, and as simple or complex as one
PLEASE - Whatever you do, use a real encryption algorithm and not home-grown
encryption like XOR or bit shifting!
Peter DeBetta, MVP - SQL Server
@gmail.com> wrote in message
On 7 Mar, 10:43, "Rahul" <verma.car
> I have plan to store application passwords in there database.
> So how i can Encrypt or decrypt our password.
> Is there any other way to store the password.
Are you sure you want to encrypt the passwords? The only good excuse
for doing so is if you need to support some kind of password recovery.
Password recovery has its own security problems so avoid it if you
Best practice is to hash the password rather than encrypt it. Good
password management rules are a must as well. You can hash passwords
either with the HashBytes function in SQL Server 2005 or with
Microsoft's crypto API in any other version.
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online: