用VBS模拟实现PHP的sha1
导读:收集整理的这篇文章主要介绍了用VBS模拟实现PHP的sha1_file函数效果代码,觉得挺不错的,现在分享给大家,也给大家做个参考。 复制代码 代码如下: Function sha1_f...
收集整理的这篇文章主要介绍了用VBS模拟实现PHP的sha1_file函数效果代码,觉得挺不错的,现在分享给大家,也给大家做个参考。 复制代码 代码如下: 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 您可能感兴趣的文章:
- php中可能用来加密字符串的函数[base64_encode、urlencode、sha1]
- PHP实现加密的几种方式介绍
- 2个比较经典的PHP加密解密函数分享
- php中base64_decode与base64_encode加密解密函数实例
- PHP中加密解密函数与DES加密解密实例
- php中AES加密解密的例子小结
- PHP可逆加密/解密函数分享
- PHP 加密解密内部算法
- php基于mcrypt的加密解密实例
- php 的加密函数 md5,crypt,base64_encode 等使用介绍
- php rsa加密解密使用详解
- PHP实现的简单sha1加密功能示例
声明:本文内容由网友自发贡献,本站不承担相应法律责任。对本内容有异议或投诉,请联系2913721942#qq.com核实处理,我们将尽快回复您,谢谢合作!
若转载请注明出处: 用VBS模拟实现PHP的sha1
本文地址: https://pptw.com/jishu/609870.html
