MD5 digest

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
jwbuzz
Posts: 39
Joined: Tue Apr 13, 2010 7:56 pm

MD5 digest

Post by jwbuzz » Thu May 06, 2010 9:33 pm

I'm writing an app that communicates back to a webserver. I'm passing a request parameter that that is a string I build with number + timestamp + salt and then using md5 digest on it.

On the backend is a PHP application that I call the MD5 function on with the same string. The problem is I get a different value. Anyone know the behavior enough in Revolution to make any recommendations.

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: MD5 digest

Post by Mark » Fri May 07, 2010 12:41 am

Dear jwbuss,

Does this help?

Code: Select all

get binarydecode("H*",md5digest("hello world"),myVar)
-- myVar now contains the same data as md5() on php
Best regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

jwbuzz
Posts: 39
Joined: Tue Apr 13, 2010 7:56 pm

Re: MD5 digest

Post by jwbuzz » Fri May 07, 2010 3:35 pm

That's exactly what I needed. Thanks.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10045
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: MD5 digest

Post by FourthWorld » Fri May 07, 2010 4:11 pm

Brilliant work, Mark. How did you arrive at binaryEncode as the solution?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply