求基于VB的md5文件验证代码

来源:百度知道 编辑:UC知道 时间:2024/05/26 14:36:16
是文件的啊
100分
先用10分出来

http://www.dqbdc.com/VBMD5.txt

把代码放入模块中,就可以直接调用了

格式:md5(密码,32)或md5(密码,16)

'复制下面代码到窗体代码区,运行即可。

Option Explicit

Private Declare Function CryptAcquireContext Lib "advapi32.dll" _
Alias "CryptAcquireContextA" ( _
ByRef phProv As Long, _
ByVal pszContainer As String, _
ByVal pszProvider As String, _
ByVal dwProvType As Long, _
ByVal dwFlags As Long) As Long

Private Declare Function CryptReleaseContext Lib "advapi32.dll" ( _
ByVal hProv As Long, _
ByVal dwFlags As Long) As Long

Private Declare Function CryptCreateHash Lib "advapi32.dll" ( _
ByVal hProv As Long, _
ByVal Algid As Long, _
ByVal hKey As Long, _
ByVal dwFlags As Long, _
ByRef phHash As Long) As Long

Private Declare F