MD5digest hash in hex
kee nethery
kee at kagi.com
Tue Jul 13 10:12:01 EDT 2004
I'm trying to duplicate an MD5 hash that gets created by this Perl code:
----------------
Here's the code that I use:
#!/usr/bin/perl
use Digest::MD5;
$hash = Digest::MD5::md5_hex($the_string);
print "$hash\n";
------------------
Perl output samples for various values of $the_string:
"just a test" => 25c674ceb1d7e145c01011d697c6e52f
"michael" => 0acf4539a14b3aa27deeb4cbdf6e989f
"july 14 2004" => bd9969aa3c527c8b514dfbc91cbbed67
The code I am using in Revolution is
put empty into theHexMd5Hash
put md5Digest(the_string) into thisBinaryMd5Hash
put binaryDecode("h*", thisBinaryMd5Hash, theHexMd5Hash) into keeTemp
When I run this with these strings I get the following values of
theHexMd5Hash
"just a test" => 526c47ec1b7d1e540c01116d796c5ef2
"michael" => a0fc54931ab4a32ad7ee4bbcfde689f9
"july 14 2004" => db9996aac325c7b815d4bf9cc1bbde76
Any ideas what I am doing wrong?
Thanks in advance!
Kee Nethery
More information about the use-livecode
mailing list