Module MD5 加密
Module MD5
#Region "MD5加密Encrypt(ByVal sMessage, ByVal Code_Lenght)"
Public Function Encrypt(ByVal sMessage As String, ByVal CodeLenght As Int16) As String
If CodeLenght = 16 Then
Encrypt = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(sMessage, "MD5").ToLower().Substring(8, 16)
ElseIf CodeLenght = 32 Then
Encrypt = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(sMessage, "MD5").ToLower()
Else
Encrypt = "00000000000000000000000000000000"
End If
End Function
#End Region
End Module
#Region "MD5加密Encrypt(ByVal sMessage, ByVal Code_Lenght)"
Public Function Encrypt(ByVal sMessage As String, ByVal CodeLenght As Int16) As String
If CodeLenght = 16 Then
Encrypt = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(sMessage, "MD5").ToLower().Substring(8, 16)
ElseIf CodeLenght = 32 Then
Encrypt = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(sMessage, "MD5").ToLower()
Else
Encrypt = "00000000000000000000000000000000"
End If
End Function
#End Region
End Module