Re: Re: Crypt salts not random.. (fwd)
| From: | Jani Taskinen | Date: | Sun, 29 Apr 2001 19:42:22 +0000 |
| Subject: | Re: Re: Crypt salts not random.. (fwd) | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-52979@lists.php.net to get a copy of this message | ||
This is the line in question:
php_srand(time(0) * getpid() * (php_combined_lcg() * 10000.0));
This is now (in my patch) in RINIT and thus it is a different pid
it doesn't matter if the RINIT happens the same second..
Or did I misunderstood something? And I know it works now. :)
And it didn't work before. As the PID was always the same like Andi said.
I attached the patch in case you missed it before..
--Jani
On Sun, 29 Apr 2001, Zeev Suraski wrote:
>Since it only occurs on the first time, chances are that (on a reasonably
>loaded web site), most rinits will happen at the same second.
>
>Zeev
>
>At 15:54 29/4/2001, Andi Gutmans wrote:
>>At 02:50 PM 4/29/2001 +0300, Zeev Suraski wrote:
>>>So it's probably not a lot more random than it was before...
>>
>>I think it is because the time of the rinit()'s are different now (unless
>>some of them run at exactly the same time).
>>
>>Andi
>>
>>
>>>Zeev
>>>
>>>At 15:44 29/4/2001, Andi Gutmans wrote:
>>>>At 02:35 PM 4/29/2001 +0300, Zeev Suraski wrote:
>>>>>At 15:27 29/4/2001, Andi Gutmans wrote:
>>>>>>Jani has already moved it to RINIT which is a good beginning.
>>>>>
>>>>>It may be a good beginning functionality wise, but it might not be a
>>>>>very good beginning performance-wise. We should probably do it JIT.
>>>>
>>>>Well Jani's patch doesn't do it each time. It just does it the first
>>>>time RINIT is called.
>>>>
>>>>Andi
>>>
>>>--
>>>Zeev Suraski <zeev@zend.com>
>>>CTO & co-founder, Zend Technologies Ltd.
>>>http://www.zend.com/
>
>--
>Zeev Suraski <zeev@zend.com>
>CTO & co-founder, Zend Technologies Ltd.
>http://www.zend.com/
>