会员
周边
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
着迷Linux
菲一打
将密码转化为Hash输出
<
%@ Page Language
=
"
VB
"
Debug
=
"
true
"
%
>
<
Script runat
=
"
server
"
>
Private
Sub Page_Load()
Sub
Page_Load(
ByVal
sender
As
Object
,
ByVal
e
As
System.EventArgs)
End Sub
Public
Sub btnHash_Click()
Sub
btnHash_Click(
ByVal
sender
As
Object
,
ByVal
e
As
EventArgs)
If
tbPassword.Text.Length
>
0
Then
Dim
strHashedPassword
As
String
=
FormsAuthentication.HashPasswordForStoringInConfigFile(tbPassword.Text,
"
sha1
"
)
Dim
strHashedPassword2
As
String
=
FormsAuthentication.HashPasswordForStoringInConfigFile(tbPassword.Text,
"
MD5
"
)
liHashedPassword.Text
=
"
Hashed(shal) Password is:
"
+
strHashedPassword
+
"
<BR>
"
+
"
Hashed(MD5) Password is:
"
+
strHashedPassword2
End
If
End Sub
</
Script
>
<
Form runat
=
"
server
"
>
<
asp:TextBox id
=
"
tbPassword
"
Runat
=
"
server
"
/>
<
asp:Button id
=
"
tbnClick
"
Text
=
"
Click
"
Runat
=
"
server
"
OnClick
=
"
btnHash_Click
"
/><
BR
>
<
asp:Label id
=
"
liHashedPassword
"
Runat
=
"
server
"
/>
</
Form
>
发表于
2005-04-14 08:31
菲一打
阅读(
422
) 评论(
0
)
收藏
举报
刷新页面
返回顶部
公告
导航
博客园
首页
新随笔
新文章
联系
订阅
管理