ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   User-defined formula (VBA) that can convert a text value into MD5 (https://www.excelbanter.com/excel-programming/381569-user-defined-formula-vba-can-convert-text-value-into-md5.html)

Beefminator

User-defined formula (VBA) that can convert a text value into MD5
 
For a cell, how can I set up an user-defined formula that can convert a
text value into MD5?

I looked at this website on VBA script for MD5 encryption, but I don't
know where to go from he
http://www.osix.net/modules/usercp/n...?name=MaxMouse

Thanks,
Jason


Gary''s Student

User-defined formula (VBA) that can convert a text value into MD5
 
See:

http://groups.google.com/group/micro...eb99b593e7c7a6


--
Gary''s Student
gsnu200702


"Beefminator" wrote:

For a cell, how can I set up an user-defined formula that can convert a
text value into MD5?

I looked at this website on VBA script for MD5 encryption, but I don't
know where to go from he
http://www.osix.net/modules/usercp/n...?name=MaxMouse

Thanks,
Jason



Beefminator

User-defined formula (VBA) that can convert a text value into MD5
 
Thank you for replying.

Am I using the correct user-defined VBA formula?
=GetMD5Hash(A1)

If so, then I am getting a weird output. I was expecting more of a text
output.

Gary''s Student wrote:
See:

http://groups.google.com/group/micro...eb99b593e7c7a6


--
Gary''s Student
gsnu200702


"Beefminator" wrote:

For a cell, how can I set up an user-defined formula that can convert a
text value into MD5?

I looked at this website on VBA script for MD5 encryption, but I don't
know where to go from he
http://www.osix.net/modules/usercp/n...?name=MaxMouse

Thanks,
Jason




JLatham

User-defined formula (VBA) that can convert a text value into
 
Do your results have 32 characters and do those characters consist of the 10
digits 0-9 and letters of the alphabet from a through f? If so, then it is
probably doing it right. The 32 character count is not an absolute, but
results usually contain that number of characters.
Wikipedia has a pretty good writeup about MD5.
http://en.wikipedia.org/wiki/MD5

"Beefminator" wrote:

Thank you for replying.

Am I using the correct user-defined VBA formula?
=GetMD5Hash(A1)

If so, then I am getting a weird output. I was expecting more of a text
output.

Gary''s Student wrote:
See:

http://groups.google.com/group/micro...eb99b593e7c7a6


--
Gary''s Student
gsnu200702


"Beefminator" wrote:

For a cell, how can I set up an user-defined formula that can convert a
text value into MD5?

I looked at this website on VBA script for MD5 encryption, but I don't
know where to go from he
http://www.osix.net/modules/usercp/n...?name=MaxMouse

Thanks,
Jason





Beefminator

User-defined formula (VBA) that can convert a text value into
 
No, the formula does not produce 32 characters; it is weird looking.
Here is my excel file; take a look at it.
http://www.walkhere.com/Vba_MD5.xls

I put the text word "test" as my text input, and I should get
"098f6bcd4621d373cade4e832627b4f6"

Thanks again for looking into this,
Jason

JLatham (removethis) wrote:
Do your results have 32 characters and do those characters consist of the 10
digits 0-9 and letters of the alphabet from a through f? If so, then it is
probably doing it right. The 32 character count is not an absolute, but
results usually contain that number of characters.
Wikipedia has a pretty good writeup about MD5.
http://en.wikipedia.org/wiki/MD5



JLatham

User-defined formula (VBA) that can convert a text value into
 
Well, that is rather interesting, isn't it?
I'm going to go back to ground zero and put together a workbook using the
same source that you did and see what I end up with. That will give us an
idea of whether that source code is messed up or whether you've just managed
to really hand it something it is totally unprepared to deal with.

"Beefminator" wrote:

No, the formula does not produce 32 characters; it is weird looking.
Here is my excel file; take a look at it.
http://www.walkhere.com/Vba_MD5.xls

I put the text word "test" as my text input, and I should get
"098f6bcd4621d373cade4e832627b4f6"

Thanks again for looking into this,
Jason

JLatham (removethis) wrote:
Do your results have 32 characters and do those characters consist of the 10
digits 0-9 and letters of the alphabet from a through f? If so, then it is
probably doing it right. The 32 character count is not an absolute, but
results usually contain that number of characters.
Wikipedia has a pretty good writeup about MD5.
http://en.wikipedia.org/wiki/MD5




JLatham

User-defined formula (VBA) that can convert a text value into
 
Some further research shows that what you are getting is probably correct
given the method being used. See this page:
http://www.excelsig.org/VBA/wwHash.htm
So what (apparently, as I understand it) is happening is that a MD5 code is
being generated AND being encrypted. What you're seeing (and I saw on my
system also) is the encrypted results?

I'm going to nose around a bit more and see if there isn't an MD5 generator
available that doesn't encrypt the result.

Although maybe it is just enough to know that the algorigthm is working and
providing consistent results? If you just use the results internally then
you don't need to be concerned with their appearance to the user - only that
a given input will result in a consistent output?

"Beefminator" wrote:

No, the formula does not produce 32 characters; it is weird looking.
Here is my excel file; take a look at it.
http://www.walkhere.com/Vba_MD5.xls

I put the text word "test" as my text input, and I should get
"098f6bcd4621d373cade4e832627b4f6"

Thanks again for looking into this,
Jason

JLatham (removethis) wrote:
Do your results have 32 characters and do those characters consist of the 10
digits 0-9 and letters of the alphabet from a through f? If so, then it is
probably doing it right. The 32 character count is not an absolute, but
results usually contain that number of characters.
Wikipedia has a pretty good writeup about MD5.
http://en.wikipedia.org/wiki/MD5




Beefminator

User-defined formula (VBA) that can convert a text value into
 
Hey thanks for following up on this,

I copied the VBA code fromt the following website:
http://www.osix.net/modules/usercp/n...?name=MaxMouse

I copied everything from Option Explicit to the bottom of the page. I
used the "DigestStrToHexStr" as the user-defined function. Works good!

This also works good for MS Access.


Beefminator

User-defined formula (VBA) that can convert a text value into
 
Cool...thanks again for your time.



All times are GMT +1. The time now is 08:01 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com