c# - ASP.NET Hashed PW's + Salt Confusion -


I am following the MSDN article located here:

My confusion is on the function:

  Private String String CreatePasswordHash (string pwd, string salt) {string salt and pw = string .concot (pwd, salt); String hashed PWD = form attestation. Hashpswordforstoring sign file (salt and pwd, "SHA1"); HashedPwd = String.Concat (hashed PWD, salt); Return Hashard Power; }  

My understanding is that: 1. Share the salt and plain text PWD 2. A hashed pass has been made using Sha1. 3. Repeat the salt with palm pHD which was originally salt in it ???

What is the logic behind Step 3? I've got a function similar to MSDN and where it leaves the last consulate.

I do not understand why the last concocket operation in MSDN version is

It is storing salt with a hacked password so that you can remove the whole thing from the configuration file (or wherever you store it), press the salt on the end, hover the password that comes with it and the configuration from the hashead password Compare the results of If you do not store salt with a hashed password in the configuration, you can store it somewhere and when you do the test, remove it from there to hashed in the incoming password. Since SHA1 is a fixed 160 bit (20bytes), it is easy to hold salt in the hashed password without leaving the first 20 characters.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -