手机
当前位置:查字典教程网 >脚本专栏 >vbs >用VBS实现PHP的md5_file函数代码
用VBS实现PHP的md5_file函数代码
摘要:复制代码代码如下:Functionmd5_file(filename,raw_output)DimHashedData,Utility,St...

复制代码 代码如下:

Function md5_file(filename, raw_output)

Dim HashedData, Utility, Stream

Set HashedData = CreateObject("CAPICOM.HashedData")

Set Utility = CreateObject("CAPICOM.Utilities")

Set Stream = CreateObject("ADODB.Stream")

HashedData.Algorithm = 3

Stream.Type = 1

Stream.Open

Stream.LoadFromFile filename

Do Until Stream.EOS

HashedData.Hash Stream.Read(1024)

Loop

If raw_output Then

md5_file = Utility.HexToBinary(HashedData.Value)

Else

md5_file = HashedData.Value

End If

End Function

参考链接:HashedData Object

原文:http://demon.tw/programming/vbs-php-md5_file.html

【用VBS实现PHP的md5_file函数代码】相关文章:

一个实现VBS倒计时的代码

用vbscript脚本实现返回 IP 配置数据的代码

vbs实现的汉字转拼音的函数

利用vbs类实现css按钮的代码

用vbs实现的利用ADSL拨号变ip刷投票的代码

使用SAFEARRAY返回的代码

用VBS脚本实现更换Windows Xp序列号的代码

vbscript 调用WebService实现代码

用vbs实现更改计算机的说明的代码

用vbs实现的exe2swf工具脚本代码

精品推荐
分类导航