MD5中的哈希功能在不使用VBA的情况下 [英] MD5 Hash function in excel without using VBA

查看:86
本文介绍了MD5中的哈希功能在不使用VBA的情况下的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一个将在Excel中获取整个单元格值的函数,并将该值转换为新单元格中的MD5哈希值。有没有一个excel中的公式呢?我需要解决方案而不使用VBA。可以吗?

解决方案

我做到了这一点。在这里,您可以在没有VBA的纯Excel中下载 MD5。 仅限Office 2013。



http://rghost.ru/download/52431889/443023f8bef59a9a409e3e93fdffa4c35cdfb7d3/443023f8bef59a9a409e3e93fdffa4c35cdfb7d3/MD5.xlsx



Office 2013配有便利的功能,例如 BITAND() BITOR() BITXOR() BITR [L] SHIFT()。我认为这在技术上可能在以前版本的Office中实现MD5,但是由于您必须将值转换为二进制,因此将其转换为字符串,然后将字符替换与算术加法/减法等等。添加到这个15位数最大数字精度(这意味着你将很难甚至处理16位二进制值)。



我的工作簿可以处理长达1024个ASCII字符的字符串。这是为了减少文件大小(已经是185 kb)。如果需要处理较长的消息,可以将计算块添加到表的底部(单个计算块由64行组成)。但是我认为这足以证明纯粹的Excel中的MD5并不是一个好主意。


I need a function that will take an entire cell value in Excel and convert the value into its MD5 hash equivalent in a new cell. Is there a formula in excel that does that? I need solution without using VBA. Is it possible?

解决方案

I did this. Here you can download MD5 in pure Excel without VBA. Office 2013 ONLY.

http://rghost.ru/download/52431889/443023f8bef59a9a409e3e93fdffa4c35cdfb7d3/443023f8bef59a9a409e3e93fdffa4c35cdfb7d3/MD5.xlsx

Office 2013 comes with handy functions for bitwise operations like BITAND(), BITOR(), BITXOR(), BITR[L]SHIFT(). I think it's technically possible to implement MD5 in previous versions of Office, but it will be utter hell because you will have to convert values to binary, then convert this to strings, then do some character replacement mixed with arithmetical addition/subtraction etc. etc. Add to this 15-digit maximum number precision (which means you will have hard time even processing 16-bit binary values).

My workbook can process strings up to 1024 ASCII characters long. This is to reduce the file size (which is already 185 kb). If you need to process longer messages you can add calculation blocks to the bottom of the table (a single calculation block consists of 64 rows). But I think this is pretty much enough to demonstrate that MD5 in pure Excel isn't really a good idea.

这篇关于MD5中的哈希功能在不使用VBA的情况下的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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