如何使用.net中的md5函数?
PublicFunctionmd5(ByValstrAsString,ByValcodeAsInteger)AsString
'---------传说中的MD5加密
Ifcode=16Then
ReturnSystem.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(str,"MD5").ToLower().Substring(8,16)
ElseIfcode=32Then
ReturnSystem.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(str,"MD5")
Else
Return"00000000000000000000000000000000"
EndIf
EndFunction
'---------传说中的MD5加密
Ifcode=16Then
ReturnSystem.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(str,"MD5").ToLower().Substring(8,16)
ElseIfcode=32Then
ReturnSystem.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(str,"MD5")
Else
Return"00000000000000000000000000000000"
EndIf
EndFunction
本文地址:http://www.45fan.com/dnjc/69297.html