Article View: borland.public.cppbuilder.internet.socket
Article #2177Re: IdHashMessageDigest5 Exception
From: Skaarak
Date: Thu, 13 Jul 2006 20:17
Date: Thu, 13 Jul 2006 20:17
35 lines
1964 bytes
1964 bytes
"Skaarak" <skaarak@NOakamailSPAM.com> wrote in message
news:44b69496$1@newsgroups.borland.com...
> BCB6, Indy9 (9.0.50)
>
> I'm trying to get the hash of a file, I'm using this code:
>
> void __fastcall TMainForm::Button2Click(TObject *Sender)
> {
> unsigned int val;
>
> TIdHashMessageDigest5 *MD5 = new TIdHashMessageDigest5 ();
> val = MD5->HashValue("pvr2_0001.txt");
> debugbox2->Text = val;
> delete MD5;
> }
>
> Whenever the HashValue function is run it raises an Exception that goes
> into the IdHashMessageDigest.hpp file:
> public:
> inline unsigned __fastcall HashValue(const AnsiString ASrc){ return
> TIdHash128::HashValue(ASrc); }
>
> Is there some other trick to this method?
Just running this Code:
fh = new TFileStream ("pvr2_0001.bin", fmOpenRead);
TIdHashMessageDigest5 *MD5 = new TIdHashMessageDigest5 ();
MD5->HashValue(fh);
delete MD5;
delete fh;
Also crashes on the MD5->HashValue(fh) line.
-Cory
Technical Details
Message-ID:
<44b6aa54@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news1.google.com!atl-c05.usenetserver.com!news.usenetserver.com!peer01.west.cox.net!cox.net!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<44b69496$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,266f2c6a9c0ef055 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Skaarak" <skaarak@NOakamailSPAM.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <44b69496$1@newsgroups.borland.com> Subject: Re: IdHashMessageDigest5 Exception Date: Thu, 13 Jul 2006 14:17:49 -0600 Lines: 37 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 X-RFC2646: Format=Flowed; Response NNTP-Posting-Host: 63.231.79.30 Message-ID: <44b6aa54@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1152821844 63.231.79.30 (13 Jul 2006 13:17:24 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news1.google.com!atl-c05.usenetserver.com!news.usenetserver.com!peer01.west.cox.net!cox.net!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail