« Return to Thread: slow startup again...

Re: PHP to Lasso

by bilcorry :: Rate this Message:

Reply to Author | View in Thread

Bil Corry wrote on 7/7/2009 3:15 PM:

> David Bergkvist wrote on 7/7/2009 3:09 PM:
>> I need a quick check so I'm on the right track. Since I'm not used to
>> PHP I tend to assume things as I read them. Have I missed anything in my
>> conversion from PHP to Lasso below?
>>
>> PHP
>> ------------------
>> function invoice_digest($eid, $pno, $secret) {
>>     $string = $eid . ":" . $pno . ":" . $secret;
>>     return md5_base64($string);
>> }
>
> Best guess:

If Jason's source is correct, then it's this:

=========================================================
[
define_tag('invoice_digest',-required='eid',-required='pno',-required='secret');
  return(encode_base64(encrypt_md5(#eid + ':' + #pno + ':' + #secret))->removetrailing('=')&);
/define_tag;

invoice_digest(123,456,'ssh!');
]

LP8:  Y2QxZmZmZTI5ZWE4NWZjOWI2NjgxNzI5MjRmNWIzNGE
=========================================================


- Bil


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/


 « Return to Thread: slow startup again...