?
Solved

Indy MD5 - Inconsistent results

Posted on 2004-10-09
4
Medium Priority
?
929 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
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
Course of the Month15 days, 8 hours left to enroll

741 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