[fpc-pascal] MD5 Hash of StringList
james at productionautomation.net
Thu Jul 4 18:13:20 CEST 2019
That got me on the right path.
Here's the working sample:
Hash := Md5Print(MD5String(MyStringlist.Text));
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:
>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
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...
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