🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.internet.socket
8 messages
8 total messages Started by Skaarak Thu, 13 Jul 2006 17:13
Indy 9, BCB 6 & IdHashMessageDigest.pas
#2267
Author: Skaarak
Date: Thu, 13 Jul 2006 17:13
13 lines
1333 bytes
I'm trying to use the MD5 hash from Indy, which in 9 went
to the file IdHashMessageDigest.pas.

However, after fighting with BCB6 & Indy 9, finding lost RSP
files and getting it installed.  There is no component HashMessageDigest.
I have 5 Indy Tabs, Server, Client, Misc, Intercepts & IO Handlers but
scanning through them I don't see anything that's like what I'm looking for.

Going over the news groups twice I haven't seen anything either.

Thanks to any who have suggestions!

-Cory 
Re: Indy 9, BCB 6 & IdHashMessageDigest.pas
#2268
Author: Skaarak
Date: Thu, 13 Jul 2006 18:12
37 lines
2397 bytes
"Skaarak" <skaarak@NOakamailSPAM.com> wrote in message 
news:44b67f0d@newsgroups.borland.com...
> I'm trying to use the MD5 hash from Indy, which in 9 went
> to the file IdHashMessageDigest.pas.
>
> However, after fighting with BCB6 & Indy 9, finding lost RSP
> files and getting it installed.  There is no component HashMessageDigest.
> I have 5 Indy Tabs, Server, Client, Misc, Intercepts & IO Handlers but
> scanning through them I don't see anything that's like what I'm looking 
> for.
>
> Going over the news groups twice I haven't seen anything either.
>
> Thanks to any who have suggestions!

Assuming that there is no component, I included the IdHashMessageDigest.hpp
file in my CPP file, and then added the following code:

    TIdHashMessageDigest5 *MD5 = new TIdHashMessageDigest5 ();
    debugbox2->Text = MD5->HashValue("pvr2_0001.txt");
    delete MD5;

The only problem is that with this code in there I get a no descript error:
[Linker Error] Fatal: Access violation.  Link terminated.

I'm also assuming this has to do with something in my upgrading from Indy 8
to Indy 9, but I'm at a loss as to how to fix it.  If I leave the .HPP file 
as an
include and remove the code snippet the program complies fine.  Once the
snippet has been added it will not compile after wards.

I've tried deleting all .OBJ and temporary files, but it didn't seem to 
help.

Any new ideas on this?

-Cory
Re: Indy 9, BCB 6 & IdHashMessageDigest.pas
#2269
Author: Skaarak
Date: Thu, 13 Jul 2006 18:36
45 lines
2733 bytes
"Skaarak" <skaarak@NOakamailSPAM.com> wrote in message 
news:44b68d08@newsgroups.borland.com...
> "Skaarak" <skaarak@NOakamailSPAM.com> wrote in message 
> news:44b67f0d@newsgroups.borland.com...
>> I'm trying to use the MD5 hash from Indy, which in 9 went
>> to the file IdHashMessageDigest.pas.
>>
>> However, after fighting with BCB6 & Indy 9, finding lost RSP
>> files and getting it installed.  There is no component HashMessageDigest.
>> I have 5 Indy Tabs, Server, Client, Misc, Intercepts & IO Handlers but
>> scanning through them I don't see anything that's like what I'm looking 
>> for.
>>
>> Going over the news groups twice I haven't seen anything either.
>>
>> Thanks to any who have suggestions!
>
> Assuming that there is no component, I included the 
> IdHashMessageDigest.hpp
> file in my CPP file, and then added the following code:
>
>    TIdHashMessageDigest5 *MD5 = new TIdHashMessageDigest5 ();
>    debugbox2->Text = MD5->HashValue("pvr2_0001.txt");
>    delete MD5;
>
> The only problem is that with this code in there I get a no descript 
> error:
> [Linker Error] Fatal: Access violation.  Link terminated.
>
> I'm also assuming this has to do with something in my upgrading from Indy 
> 8
> to Indy 9, but I'm at a loss as to how to fix it.  If I leave the .HPP 
> file as an
> include and remove the code snippet the program complies fine.  Once the
> snippet has been added it will not compile after wards.
>
> I've tried deleting all .OBJ and temporary files, but it didn't seem to 
> help.
>
> Any new ideas on this?

Okay, by adding the .OBJ file of the IdHashMessageDigest to the project
I now compile.  Annoying, but liveable.

-Cory 
Re: Indy 9, BCB 6 & IdHashMessageDigest.pas
#2273
Author: Remy Lebeau (TeamB)
Date: Thu, 13 Jul 2006 19:51
19 lines
1513 bytes
"Skaarak" <skaarak@NOakamailSPAM.com> wrote in message
news:44b67f0d@newsgroups.borland.com...

> There is no component HashMessageDigest.

The Hash classes are not components.  They are standalone classes that
derive directly from TObject, so you have to instantiate them in code when
needed.

> I have 5 Indy Tabs, Server, Client, Misc, Intercepts & IO Handlers
> but scanning through them I don't see anything that's like what I'm
> looking for.

You are looking in the wrong place.  Not everything in Indy are components
that can be placed on a form at design-time.


Gambit
Re: Indy 9, BCB 6 & IdHashMessageDigest.pas
#2271
Author: Remy Lebeau (TeamB)
Date: Thu, 13 Jul 2006 19:55
25 lines
1767 bytes
"Skaarak" <skaarak@NOakamailSPAM.com> wrote in message
news:44b68d08@newsgroups.borland.com...

> Assuming that there is no component, I included the
> IdHashMessageDigest.hpp file in my CPP file, and then
> added the following code:

That is the correct thing to do.

>     TIdHashMessageDigest5 *MD5 = new TIdHashMessageDigest5 ();
>     debugbox2->Text = MD5->HashValue("pvr2_0001.txt");
>     delete MD5;
>
> The only problem is that with this code in there I get a no descript
error:
> [Linker Error] Fatal: Access violation.  Link terminated.

TIdHashMessageDigest5 inherits the HashValue(String) method from TIdHash128.
TIdHash128.HashValue(String) does not return a String.  It returns a
T4x4LongWordRecord instead.  The second line of the code above should not
even compile.


Gambit
Re: Indy 9, BCB 6 & IdHashMessageDigest.pas
#2274
Author: Remy Lebeau (TeamB)
Date: Thu, 13 Jul 2006 19:58
14 lines
1455 bytes
"Skaarak" <skaarak@NOakamailSPAM.com> wrote in message
news:44b6929b$1@newsgroups.borland.com...

> Okay, by adding the .OBJ file of the IdHashMessageDigest to
> the project I now compile.  Annoying, but liveable.

You should not do that.  You should be including the actual Indy library
into the project instead, either static-linked or as an external runtime
package.  The .OBJ files of the individual units are compiled into the
overall library.


Gambit
Re: Indy 9, BCB 6 & IdHashMessageDigest.pas
#2272
Author: Skaarak
Date: Thu, 13 Jul 2006 20:03
31 lines
2089 bytes
"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message 
news:44b6a5c3$3@newsgroups.borland.com...
>
> "Skaarak" <skaarak@NOakamailSPAM.com> wrote in message
> news:44b68d08@newsgroups.borland.com...
>
>> Assuming that there is no component, I included the
>> IdHashMessageDigest.hpp file in my CPP file, and then
>> added the following code:
>
> That is the correct thing to do.
>
>>     TIdHashMessageDigest5 *MD5 = new TIdHashMessageDigest5 ();
>>     debugbox2->Text = MD5->HashValue("pvr2_0001.txt");
>>     delete MD5;
>>
>> The only problem is that with this code in there I get a no descript
> error:
>> [Linker Error] Fatal: Access violation.  Link terminated.
>
> TIdHashMessageDigest5 inherits the HashValue(String) method from 
> TIdHash128.
> TIdHash128.HashValue(String) does not return a String.  It returns a
> T4x4LongWordRecord instead.  The second line of the code above should not
> even compile.

Well, it complied fine... In my code preview it says it returns a Unsigned 
Int?
It is just a pointer to the T4x4?

-Cory 
Re: Indy 9, BCB 6 & IdHashMessageDigest.pas
#2275
Author: Skaarak
Date: Thu, 13 Jul 2006 20:13
19 lines
1744 bytes
"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message 
news:44b6a81f@newsgroups.borland.com...
>
> "Skaarak" <skaarak@NOakamailSPAM.com> wrote in message
> news:44b6929b$1@newsgroups.borland.com...
>
>> Okay, by adding the .OBJ file of the IdHashMessageDigest to
>> the project I now compile.  Annoying, but liveable.
>
> You should not do that.  You should be including the actual Indy library
> into the project instead, either static-linked or as an external runtime
> package.  The .OBJ files of the individual units are compiled into the
> overall library.
>

Yeah, I'm not happy about it, but I don't have a way around it.  Any
thoughts?

-Cory 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads