先看段组件的代码:(临时写的,写得比较乱)
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '''' '''' '''' 登录验证组件 '''' '''' '''' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Imports System.Security.Cryptography Imports System.Text Imports System.Data Imports System.Data.SqlClient
Public Class ValidatorClass Validator Inherits System.ComponentModel.Component
Private username As String Private userpwd As String
Public Property vUsername()Property vUsername() As String Get Return username End Get Set(ByVal Value As String) username = Value End Set End Property
Public Property vUserpwd()Property vUserpwd() As String Get Return userpwd End Get Set(ByVal Value As String) userpwd = Value End Set End Property
''''转换为MD5 Private Function convertMD5()Function convertMD5(ByVal pwd As String) As String
Dim md5 As New MD5CryptoServiceProvider Dim password As Byte() = (New ASCIIEncoding).GetBytes(pwd)
''''转换为哈希值Byte数组 Dim mdByte As Byte() = md5.ComputeHash(password) ''''Dim mdString[1] [2] [3] [4] [5] [6] [7] 下一页 |