🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #5070

TIdHashMessageDigest5 example : i'm lost !

#5070
From: Laura Martignas
Date: Wed, 03 Nov 2004 22:01
18 lines
1337 bytes
Hi

I've just installed Indy 9 in C++ Builder, and I would like to calculate 
MD5 checksum of a string. I did like this :

T4x4LongWordRecord hash;
String hashHex
TIdHashMessageDigest5 *encoder = new TIdHashMessageDigest5();
hash = encoder->HashValue("test");
hashHex = encoder->AsHex(NULL, hash);

But it doesn't work at all ! Could someone give me a correct example of 
calculating a MD5 and converting it to hexa for C++ Builder ? All examples 
I found over the net are for Delphi that I don't know at all, and Indy 
documentation is for Delphi too :(

Thanks all
Laura
Technical Details
Message-ID: <Xns9596EA39DF588lauraliberty@193.252.117.183>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!193.252.118.146.MISMATCH!news.wanadoo.fr!news.wanadoo.fr!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,3aff605d2e1d4dd0,start
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!193.252.118.146.MISMATCH!news.wanadoo.fr!news.wanadoo.fr!not-for-mail
Newsgroups: borland.public.cppbuilder.internet.socket
Subject: TIdHashMessageDigest5 example : i'm lost !
From: Laura Martignas <lauramarty@libertysurf.fr>
Message-ID: <Xns9596EA39DF588lauraliberty@193.252.117.183>
User-Agent: Xnews/06.02.16
Date: 03 Nov 2004 22:01:31 GMT
Lines: 18
Organization: les newsgroups par Wanadoo
NNTP-Posting-Host: ABordeaux-152-2-2-75.w82-125.abo.wanadoo.fr
X-Trace: 1099519291 news.wanadoo.fr 25200 82.125.193.75:2660
X-Complaints-To: abuse@wanadoo.fr