SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Decrypt encrypted password
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

shajimanjeri
Posting Yak Master

India
179 Posts

Posted - 09/26/2012 :  02:33:34  Show Profile  Reply with Quote
Dears,

I have created a asp.net user through asp.net membership form. Here my question that after I crated this user then password stored as in encrypted text. I need to write a sql query to decryption the password to be a readable password.

Below is my code but it give null value for the decrypted password field


select u.UserName as UserName, u.UserId UsID, m.Email as Email, m.Password as pwd,
convert(varchar(10), decryptbykey(m.Password, 1, convert(varchar(100), m.UserId))) as pwd 
from aspnet_Membership m, aspnet_Users u where u.UserId = m.UserId


Regards
Shaji

senthil_nagore
Flowing Fount of Yak Knowledge

India
1007 Posts

Posted - 09/26/2012 :  03:15:24  Show Profile  Visit senthil_nagore's Homepage  Send senthil_nagore a Yahoo! Message  Reply with Quote
How you encrypted your Password? if you use your .net code for Encryption, you have to do the Decryption on the same way.

Senthil Kumar C
------------------------------------------------------
MCITP - Database Administration SQL SERVER 2008
MCTS - Database Development SQL SERVER 2008
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000