convert md5digest to HEX?

kee nethery kee at kagi.com
Tue Nov 11 11:57:37 EST 2003


> At 9:26 pm -0800 10/11/03, kee nethery wrote:
>
>> Is there a way to use baseConvert or binaryDecode to convert an 
>> md5digest result to hex?
>
> I use this function:
>
> function hexDigest pvalue
>   local tRes
>   put md5Digest(pValue) into tMD5
>   get binaryDecode("H*",tMD5,tRes)
>   return tRes
> end hexDigest

Excellent, thanks to Dar Richard and Dave!

Base64 doesn't work because I need it to be compatible with other 
systems that return md5digests as hex.

> It gives the same results as the perl md5_hex method.

I think that is exactly what I am trying to duplicate.

Thanks everyone.

Kee



More information about the use-livecode mailing list