Excel VBA的密码散列函数 [英] Password hash function for Excel VBA

查看:155
本文介绍了Excel VBA的密码散列函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一个使用Excel VBA编写的函数,它将使用诸如SHA-1的标准算法对密码进行散列。有一些简单的界面,如:

 公共函数CreateHash(Value As String)As String 
...
结束功能

该功能需要在安装了Excel 2003的XP工作站上工作,否则必须不使用第三方组件。它可以引用和使用可用于XP的DLL,例如CryptoAPI。



有谁知道一个样本来实现这个散列函数?

解决方案

p>您将在VB和VBScript 此处找到MD5和SHA256实现。 p>

我相信这样做很简单。



然而有人已经做到了。不幸的是,解决方案是专家交流,不允许直接链接。所以我们必须通过谷歌。点击 here 执行Google搜索,然后单击第一个结果。向下滚动很多以查看接受的解决方案。


I need a function written in Excel VBA that will hash passwords using a standard algorithm such as SHA-1. Something with a simple interface like:

Public Function CreateHash(Value As String) As String
...
End Function

The function needs to work on an XP workstation with Excel 2003 installed, but otherwise must use no third party components. It can reference and use DLLs that are available with XP, such as CryptoAPI.

Does anyone know of a sample to achieve this hashing functionality?

解决方案

You'll find an MD5 and SHA256 implementation for VB and VBScript here.

I believe it would be quite easy to port to excel.

However someone has already done that. Unfortunately the solution is at experts-exchange which doesn't allow straight links. So we have to go through Google. Click here to perform a Google search and then click the first result. Scroll down a lot to see the accepted solution.

这篇关于Excel VBA的密码散列函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆