[fpc-pascal] MD5 Hash of StringList
James Richters
james at productionautomation.net
Thu Jul 4 18:13:20 CEST 2019
Thanks you!
That got me on the right path.
Here's the working sample:
Hash := Md5Print(MD5String(MyStringlist.Text));
James
-----Original Message-----
From: fpc-pascal <fpc-pascal-bounces at lists.freepascal.org> On Behalf Of Bo Berglund
Sent: Thursday, July 4, 2019 11:49 AM
To: fpc-pascal at lists.freepascal.org
Subject: Re: [fpc-pascal] MD5 Hash of StringList
On Thu, 4 Jul 2019 11:33:02 -0400, "James Richters"
<james at productionautomation.net> wrote:
>I'm trying to figure out how to make an MD5 Hash from an entire StringList.
> I am referencing the documentation here:
>https://wiki.freepascal.org/hash
>
>and I see how to make an MD5 Hash from a File, or from a single string, but I do not see how to make an MD5 Hash from something like a String List. It mentions: 'There are routines to calculate hashes from some buffer, or a hash from an entire file.' So how does one make an MD5 Hash from 'some buffer' ?
>
>Is there a simple way I can create an MD5 Hash from my entire stringlist, or do I have to add the strings into some sort of buffer myself and then get the hash from that?
>
>Any advice is greatly appreciated
Maybe:
hash := Md5Hash(MyStringlist.Text);
I don't know the call to the MD5hash creator, but the content of the stringlist is available as property Text...
--
Bo Berglund
Developer in Sweden
_______________________________________________
fpc-pascal maillist - fpc-pascal at lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
More information about the fpc-pascal
mailing list