<%@ import namespace="system.web.security" %>
<script language="VB" runat="server">
sub click(sender as object,e as eventargs)
dim str as string=trim(text1.text)
text2.text=FormsAuthentication.HashPasswordForStoringInConfigFile(text1.Text,"MD5")
end sub
</script>
<form runat="server">
<asp:textbox id="text1" runat="server"/><br>
<asp:textbox id="text2" runat="server"/>
<input type=submit onserverclick="click" runat="server"/>
</form>
<%@ Import Namespace="System.Web.Security" %>
<html>
<head>
<script language="VB" runat=server>
Sub encryptString(Src As Object, E As EventArgs)
SHA1.Text = FormsAuthentication.HashPasswordForStoringInConfigFile(txtPassword.Text, "SHA1")
MD5.Text = FormsAuthentication.HashPasswordForStoringInConfigFile(txtPassword.Text, "MD5")
End Sub
</script>
</head>
<body>