Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Indy MD5 - Inconsistent results

Posted on 2004-10-09
4
Medium Priority
?
945 Views
Last Modified: 2012-08-14
I have Delphi 6, and am using the TIdCoderMD5 component to create an MD5 hash, implemented to derive an intended identical hash from a string of typically 50-150 chars.    In fact, I have three strings of 10-50 chars and use one as the seed and concatenate the other two together to create the message to be hashed.

This works fine MOST of the time, (say 99%+), but occasionally (and only occasionally) I'm finding the same component generates different hashes in the two programs.   I have checked the inputs to ensure they are identical - and they are ...

Is this version a bit flakey ?  

I see other versions mentioned in this forum.   Are there other implementations of MD5 that others have used and proved as reliable. ?

Input appreciated.
Geoff

0
Comment
Question by:geoffdb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 12

Expert Comment

by:Lee_Nover
ID: 12265856
what indy version ? get the lates and check with that
if the problem still persists .. change to something else
like DEC: http://www.delphi32.com/vcl/3267/
0
 
LVL 13

Accepted Solution

by:
BlackTigerX earned 300 total points
ID: 12267368
I have never had any problems with these one:

http://www.fichtner.net/delphi/md5.delphi.phtml

full source provided and comes with full examples
0
 

Author Comment

by:geoffdb
ID: 12295859
Lee & Black Tiger

Thanks for your responses.  

I don't know what the version is, the Indy help file doesn't say, and I couldn't directly find anything in the source files either.   Its the one that came with Delphi 6.

Anyway, I've done some of my own testing, set up a routine that i can create 10k, 50k or 100k hashes, write these to disk (incld.the source data and hash), then read this data back in a second process, recalc the hash & compare with the original hash.   Even at 10,000 hashes I always got an error with the Indy version.   Not only that, it chewed up memory.

Using the same code, I replaced the Indy MD5 routine with a) the fichter one above, and b) the TurboPower Lockbox version - and found they both ran sweet, no different hashes, and no memory probs.  !!!

Interesting !!   I'm already using TP Lockbox so think I'll run with this.

Thanks
Geoff
0
 
LVL 13

Expert Comment

by:BlackTigerX
ID: 12347934
great! =o)

thanks for sharing your tests
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

597 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question