⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 computehash.aspx

📁 asp.net技术内幕的书配源码
💻 ASPX
字号:
<script language="C#" runat=server>

void Button_Click(Object sender , EventArgs e) 
{
 string  strHashValue;

  strHashValue = FormsAuthentication.HashPasswordForStoringInConfigFile( txtPassword.Text, lstAlgorithm.SelectedItem.Text );
  lblHash.Text =  strHashValue;
}

</Script>

<html>
<head><title>ComputeHash.Aspx</title></head>
<body>
<form Runat="Server">

<h2>Compute Hash Value:</h2>

<b>Password:</b>
<br>
<asp:TextBox
  ID="txtPassword"
  Runat="Server" />
<p>
<b>Algorithm:</b>
<br>
<asp:ListBox
  ID="lstAlgorithm"
  Runat="Server">
  <asp:ListItem Text="SHA1" />
  <asp:ListItem Text="MD5" />
</asp:ListBox>

<p>
<asp:Button
  Text="Compute!"
  OnClick="Button_Click"
  Runat="Server" />

<hr>
Hash Value:
<br>
<asp:Label
  ID="lblHash"
  Runat="Server" />

</form>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -