Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default 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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,365
Default 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




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,365
Default 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



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,365
Default 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



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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.

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default User-defined formula (VBA) that can convert a text value into

Cool...thanks again for your time.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
help text for user defined formula WJvR Excel Worksheet Functions 2 July 23rd 08 04:34 PM
User Defined Functions - Help Text - Make it Easy for the User Andibevan[_2_] Excel Programming 4 March 17th 05 09:51 AM
User-defined data type; Error: Only User-defined types... tiger_PRM Excel Programming 1 July 18th 04 03:32 PM
How do I convert a user defined selection into an array? TBA[_2_] Excel Programming 3 August 18th 03 12:51 AM
User defined functions - text for formula palette Tom Ogilvy Excel Programming 0 July 8th 03 02:35 PM


All times are GMT +1. The time now is 08:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"