欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

用VBS模擬實現(xiàn)PHP的sha1_file函數(shù)效果代碼

 更新時間:2011年01月21日 22:53:23   作者:  
用VBS模擬實現(xiàn)PHP的sha1_file函數(shù)效果代碼,需要的朋友可以參考下。
復制代碼 代碼如下:

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

相關(guān)文章

最新評論