| MD5的VB类模块源码 |
|
| 作者:未知 文章来源:网络收集 点击数: 更新时间:2006-3-29 15:59:13
|
| 那个网上的MD5.BAS我研究了下,有严重问题.只好另找了个自已改了下. 在窗体中调用时如下: set c1=new class 'class 为你存的类模快名 text1.text=md5_string_calc(sourcestring)
类模块源码如下:
Option Explicit
' Visual Basic MD5 Implementation ' Robert Hubley and David Midkiff (mdj2023@hotmail.com) ' modify by simonyan, Support chinese ' Standard MD5 implementation optimised for the Visual Basic environment. ' Conforms to all standards and can be used in digital signature or password ' protection related schemes.
Private Const OFFSET_4 = 4294967296# Private Const MAXINT_4 = 2147483647 Private State(4) As Long Private ByteCounter As Long Private ByteBuffer(63) As Byte Private Const S11 = 7 Private Const S12 = 12 Private Const S13 = 17 Private Const S14 = 22 Private Const S21 = 5 Private Const S22 = 9 Private Const S23 = 14 Private Const S24 = 20 Private Const S31 = 4 Private Const S32 = 11 Private Const S33 = 16 Private Const S34 = 23 Private Const S41 = 6 Private Const S42 = 10 Private Const S43 = 15 Private Const S44 = 21 Property Get RegisterA() As String RegisterA = State(1) End Property Property Get RegisterB() As String RegisterB = State(2) End Property
Property Get RegisterC() As String RegisterC = State(3) End Property
Property Get RegisterD() As String RegisterD = State(4) End Property Public Function Md5_String_Calc(SourceString As String) As String MD5Init MD5Update LenB(StrConv(SourceString, vbFromUnicode)), StringToArray(SourceString) MD5Final Md5_String_Calc = GetValues End Function Public Function Md5_File_Calc(InFile As String) As String On Error GoTo errorhandler GoSub begin
errorhandler &nb [1] [2] [3] [4] [5] [6] [7] [8] 下一页
|
|
[ 收藏此页到: 天天|和讯|博采|ViVi|狐摘|我摘|天极 ] 文章录入:kinda 责任编辑:kinda |
|
上一篇文章: WinImage密码的另一种破解——WinHex破解法 下一篇文章: 解狗思路的一点总结 |
| 【字体:小 大】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口】 |