SHA1

  • Thread starter Thread starter Daniel Groh
  • Start date Start date
D

Daniel Groh

Hi Folks,
Could someone gime an example of criptography using SHA1 ? Is it easy ?
That a simple login system, I just need to criptography the pwd when I
insert and when i retrive from the DataBase.

Thank you all!
 
Actually, it is very simple if you use the .NET WEb Security Encryption.
Something like this:

System.Web.Security.HashPasswordForStoringInConfigFile("thepassword", "SHA1");

The only problem is you can't decrypt it because the framework uses it's own
key, which you cannot see. HOWEVER, assuming you used the same key for all
passwords, you can specify your own key to the Framework in the
machine.config file. It will use that key all the time.

With that simple line of code you can encrypt a password and compare it to a
value that is already encrypted.

However, if you need to do manual encryption, it is straight forward as
well. I can explain that to you if this doesn't help.
 
Back
Top