dbWriter hashed with MD5... ASP code
Just for TEST purposes we have salted the Password with:
"40804cf889c8ad58ae1dcfa936ca18bb".
In your live code this salt should come from your database as an
additional field connected to the user, such as the users ID.
WARNING!!! This salt should never be changed OR the password is
lost until re-entered with a new salt!!
User Name = [blank] Password = test click Submit
the MD5 hashed/salted password to store in your DB =
9b06f15a15c3664da420727aad883e82
NOTE: MD5 is Case sensitive!!
<!--#include file="md5.asp"-->
<%DIM User_Name, strPassword, strSALT,
rs
User_Name = Trim(request.form("User_Name"))
set rs = server.CreateObject("Adodb.Recordset")
rs.open "Select * From tbl_Users Where User_Name='" & User_Name
& "'",cn,2,3
IF NOT rs.EOF THEN
strSALT = rs("SALT")
strPassword=MD5(Trim(Request.Form("Password")) &
strSALT)
IF NOT strPassword = rs("Password") then
Response.Redirect("Login.asp")
END IF
%>
|
|