Forums / Developer / How to hash

How to hash

Author Message

William Steenbergh

Wednesday 07 December 2005 7:25:07 am

Hey all,

I'm working on a site with eZ Publish 3.7. It's supposed to be a generic base, to be applied to our customers, through site-access. We do not wish to let our customers use the site Admin interface for content management.

We already have such a system, and for interaction with the website, customers have a Visual Basic application. In the new solution, we want to maintain this client-side app. To make this work, we need to know how eZ Publish determines the hash for certain database entries, namely:
- The remote ID in the table contentobject
- The binary filename
- perhaps more...

Does anybody know how eZ Publish determines the hash?

Lazaro Ferreira

Wednesday 07 December 2005 11:57:48 am

Hi,

It seems like remote_id hash is created as :

$this->setAttribute( 'remote_id', md5( (string)mt_rand() . (string)mktime() ) );

more info at : kernel/classes/ezcontentobject.php

I would recomend you to search for this through ezpublish kernel code, try to identify or guess the classes you need its hash for

i.e: you can find user hashes: kernel/classes/datatypes/ezuser/ezuser.php

I'm assuming ezp 3.5+

Lazaro
http://www.mzbusiness.com

William Steenbergh

Thursday 08 December 2005 12:50:25 am

Thanks, this indeed seems to be what we were looking for!