杰网资源 Design By www.escxy.com
复制代码 代码如下:
Function sha1_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 = 0
Stream.Type = 1
Stream.Open
Stream.LoadFromFile filename
Do Until Stream.EOS
HashedData.Hash Stream.Read(1024)
Loop
If raw_output Then
sha1_file = Utility.HexToBinary(HashedData.Value)
Else
sha1_file = HashedData.Value
End If
End Function

参考链接:HashedData Object
原文:http://demon.tw/programming/vbs-php-sha1_file.html
标签:
VBS,sha1_file

杰网资源 Design By www.escxy.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
杰网资源 Design By www.escxy.com