用VBS實現(xiàn)PHP的md5_file函數(shù)代碼
來源:易賢網(wǎng) 閱讀:1786 次 日期:2016-07-07 15:11:08
溫馨提示:易賢網(wǎng)小編為您整理了“用VBS實現(xiàn)PHP的md5_file函數(shù)代碼”,方便廣大網(wǎng)友查閱!

用VBS實現(xiàn)PHP的md5_file函數(shù)代碼,需要的朋友可以參考下,代碼主要是參考官方的資料。

代碼如下:

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

更多信息請查看腳本欄目
易賢網(wǎng)手機網(wǎng)站地址:用VBS實現(xiàn)PHP的md5_file函數(shù)代碼
關于我們 | 聯(lián)系我們 | 人才招聘 | 網(wǎng)站聲明 | 網(wǎng)站幫助 | 非正式的簡要咨詢 | 簡要咨詢須知 | 新媒體/短視頻平臺 | 手機站點

版權(quán)所有:易賢網(wǎng)