|
-
May 14th, 2005, 08:56 PM
#1
Thread Starter
Lively Member
Encryption or Hashing of text
i'm using dreamweaver's asp.net vb INSERT record, how do i encrypt the password the user type into the textbox
<input name="password" type="password" id="password" size="20" maxlength="15" runat="server">
<MM:Insert
runat="server"
CommandText='<%# "INSERT INTO Particulars (active, address, city, company, country, created, dob, email, fax, firstname, gender, hometelephone, lastname, mobile, officephone, password, security, state, zip) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" %>'
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_STRING_connSoftwares") %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_DATABASETYPE_connSoftwares") %>'
Expression='<%# Request.Form("MM_insert") = "Registration" %>'
CreateDataSet="false"
SuccessURL='<%# "completed.aspx" %>'
FailureURL='<%# "failed.aspx" %>'
><Parameters>
<Parameter Name="@active" Value='<%# IIf((Request.Form("active") <> Nothing), Request.Form("active"), "") %>' Type="Boolean" />
<Parameter Name="@address" Value='<%# IIf((Request.Form("address") <> Nothing), Request.Form("address"), "") %>' Type="WChar" />
<Parameter Name="@city" Value='<%# IIf((Request.Form("city") <> Nothing), Request.Form("city"), "") %>' Type="WChar" />
<Parameter Name="@company" Value='<%# IIf((Request.Form("company") <> Nothing), Request.Form("company"), "") %>' Type="WChar" />
<Parameter Name="@country" Value='<%# IIf((Request.Form("country") <> Nothing), Request.Form("country"), "") %>' Type="WChar" />
<Parameter Name="@created" Value='<%# IIf((Request.Form("created") <> Nothing), Request.Form("created"), "") %>' Type="Date" />
<Parameter Name="@dob" Value='<%# IIf((Request.Form("dob") <> Nothing), Request.Form("dob"), "") %>' Type="Date" />
<Parameter Name="@email" Value='<%# IIf((Request.Form("email") <> Nothing), Request.Form("email"), "") %>' Type="WChar" />
<Parameter Name="@fax" Value='<%# IIf((Request.Form("fax") <> Nothing), Request.Form("fax"), "") %>' Type="Numeric" />
<Parameter Name="@firstname" Value='<%# IIf((Request.Form("firstname") <> Nothing), Request.Form("firstname"), "") %>' Type="WChar" />
<Parameter Name="@gender" Value='<%# IIf((Request.Form("gender") <> Nothing), Request.Form("gender"), "") %>' Type="WChar" />
<Parameter Name="@hometelephone" Value='<%# IIf((Request.Form("hometelephone") <> Nothing), Request.Form("hometelephone"), "") %>' Type="Numeric" />
<Parameter Name="@lastname" Value='<%# IIf((Request.Form("lastname") <> Nothing), Request.Form("lastname"), "") %>' Type="WChar" />
<Parameter Name="@mobile" Value='<%# IIf((Request.Form("mobile") <> Nothing), Request.Form("mobile"), "") %>' Type="Numeric" />
<Parameter Name="@officephone" Value='<%# IIf((Request.Form("officephone") <> Nothing), Request.Form("officephone"), "") %>' Type="Numeric" />
<Parameter Name="@password" Value='<%# IIf((Request.Form("password") <> Nothing), Request.Form("password"), "") %>' Type="WChar" />
<Parameter Name="@security" Value='<%# IIf((Request.Form("security") <> Nothing), Request.Form("security"), "") %>' Type="Numeric" />
<Parameter Name="@state" Value='<%# IIf((Request.Form("state") <> Nothing), Request.Form("state"), "") %>' Type="WChar" />
<Parameter Name="@zip" Value='<%# IIf((Request.Form("zip") <> Nothing), Request.Form("zip"), "") %>' Type="Numeric" />
</Parameters>
</MM:Insert>
<MM:PageBind runat="server" PostBackBind="true" />
-
How do i use this function:
Public Function Get32ByteHash(ByVal data As String) As String
Return data.GetHashCode.ToString("X").PadLeft(32, "0"c)
End Function
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|