<%@ Page Language="VB" %>
<%@ Import Namespace="System.Web.Security" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Password Hashing Page</title>
<meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<script runat="server">
Sub Hash_Click(Sender As Object, e As EventArgs)
HashOut.Text = FormsAuthentication.HashPasswordForStoringInConfigFile(Password.Text, HashType.SelectedItem.Value)
End Sub
</script>
</head>
<body>
<form runat="server">
<table border="0">
<tr>
<td>Hash Type: </td>
<td>
<asp:dropdownlist id="HashType" runat="server">
<asp:listitem>MD5</asp:listitem>
<asp:listitem>SHA1</asp:listitem>
</asp:dropdownlist>
</td>
</tr>
<tr>
<td>Password: </td>
<td><asp:textbox id="Password" textmode="Password" runat="server"/></td>
</tr>
<tr>
<td colspan="2"><asp:button text="Hash" onclick="Hash_Click" runat="server"/></td>
</tr>
</table>
<asp:label id="HashOut" runat="server"/>
</form>
</body>
</html>
|