手机
当前位置:查字典教程网 >脚本专栏 >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实现cmd功能的代码

用VBS修改IIS Metabase的代码

一个实现VBS倒计时的代码

用VBS模拟实现PHP的sha1_file函数效果代码

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

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

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

用vbs确定用户的登录名的代码

用vbs实现cmd功能

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

精品推荐
分类导航