Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can not find how to decrypt passwords

Status
Not open for further replies.

vilrbn

Programmer
Oct 29, 2002
105
FR
Hello,

I'm encrypting passwords using the FormsAuthentication Class:

Encrypt = FormsAuthentication.HashPasswordForStoringInConfigFile(Password, "SHA1")

I didn't find how to decrypt this password. The Decrypt method seems to be available only if there is a cookie but my users don't systematically have one. Even though, I tried to use Decrypt unsuccessfully.
 
Why would you want to decrypt a password?

You compare the input value hashed to the stored hash. Hence no need to decrypt. Also as it is a hash, it is a one-way function. You cannot decrypt it.

Craig
 
Everybody has access to my site. I'm managing login and pwds when the user goes to restricted pages.

The future admin of the site (not a developer) wants to be able to display and update them via a specific interface.

I'm storing them in the DB encrypted and wanted to decrypt each of them for a display.
If it's not possible to do this, I will try to encrypt using another method.
 
The admin may need to update them as in 'I've forgotten my password.' but never to show them. That would give the admin access as that user. Not secure! For example, an admin for this PC cannot see my login password but they can reset it.

There are algorithms to do this i.e. DES but I would advise HEAVILY against.

Craig
 
I agree with you.
I'll adapt my code not to show the password. Thanks for your advises !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top