Click here to Skip to main content
15,893,668 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How to decrypt sha1 encrypted password or string in C# !

Waiting for reply !
Posted

1 solution

You can't.
SHA is not an encryption algorithm - it's a hashing algorithm, and there is a huge difference: encryption can be reversed if you have the decryption key, hashing cannot.

Hashing throws away information, which cannot be recovered - it does not encrypt information.

If you have hashed your data and need to recover it - you can't. That is the whole idea.
 
Share this answer
 
Comments
Pugal Kannan 18-Apr-14 8:03am    
I have one question.,

I need to encrypt password at client side, and i need to decrypt password at server side, give some idea for that !!!!!
OriginalGriff 18-Apr-14 8:07am    
You can't use SHA for decryption, period!

Instead, hash it at the client, and compared it against the hashed version you stored at the server. You should never try to store encrypted or plain text passwords at all - it's just not secure!
OriginalGriff 18-Apr-14 8:15am    
BTW: If you are trying to pass information of any kind that is secure from the client to the server, you really should be using https not http - which encrypts the traffic both ways.
http is not secure - and very easy to snoop - so event hashed or encrypted passwords are easy to snaffle and reuse, even if you don't know what the original data was!
Pugal Kannan 18-Apr-14 8:29am    
I know & I agree your point ! But, the my head told like client side encryption should be dynamic ! Is it have any ways !
Pugal Kannan 18-Apr-14 8:27am    
I know & I agree your point !
But, the my head told like client side encryption should be dynamic ! Is it have any ways !

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900