下载后可任意编辑MD5 加密算法的 VB6.0 类模块实例Form1 窗体及代码:Option ExplicitPrivate Sub Command1_Click()Dim c1 As New Class1Dim m As StringText2.Text = c1.DigestStrToHexStr(Text1.Text)End SubPrivate Sub Form_Load()Text1.Text = ""Text2.Text = ""End Sub调用的类模块代码如下:Option ExplicitPrivate Const OFFSET_4 = 4294967296#Private Const MAXINT_4 = 2147483647Private Const S11 = 7Private Const S12 = 12Private Const S13 = 17Private Const S14 = 22Private Const S21 = 5下载后可任意编辑Private Const S22 = 9Private Const S23 = 14Private Const S24 = 20Private Const S31 = 4Private Const S32 = 11Private Const S33 = 16Private Const S34 = 23Private Const S41 = 6Private Const S42 = 10Private Const S43 = 15Private Const S44 = 21'='= Class Variables'=Private State(4) As LongPrivate ByteCounter As LongPrivate ByteBuffer(63) As Byte'='= Class Properties'=Property Get RegisterA() As String RegisterA = State(1)End PropertyProperty Get RegisterB() As String RegisterB = State(2)End PropertyProperty Get RegisterC() As String RegisterC = State(3)End PropertyProperty Get RegisterD() As String RegisterD = State(4)End Property'='= Class Functions'='' Function to quickly digest a file into a hex string下载后可任意编辑'Public Function DigestFileToHexStr(FileName As String) As String Open FileName For Binary Access Read As #1 MD5Init Do While Not EOF(1) Get #1, , ByteBuffer If Loc(1) < LOF(1) Then ByteCounter = ByteCounter + 64 MD5Transform ByteBuffer End If Loop ByteCounter = ByteCounter + (LOF(1) Mod 64) Close #1 MD5Final DigestFileToHexStr = GetValuesEnd Function'' Function to digest a text string and output the result as a string' of hexadecimal characters.'Public Function DigestStrToHexStr(SourceString As String) As String MD5Init MD5Update Len(SourceString...