[Typo3-dev] hash generating function

Ingo Renner typo3 at ingo-renner.com
Mon Feb 21 23:45:16 CET 2005


Am Mon, 21 Feb 2005 23:22:15 +0100 schrieb Kraft Bernhard:

> Ingo Renner wrote:
>>>  $string = md5(time());
> 
> I prefer to use:
> $string = md5(time().getmypid());
> 
> so its even to processes generating the id in the same second ...

yes, I noticed already that php is 'too fast' for my needs - so I'm using 

mt_srand();
$this->hash = substr(md5(mt_rand()), 0, 5);

now.

greets
Ingo




More information about the TYPO3-dev mailing list