php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #28361 srand necessary for MCRYPT_RAND from PHP 4.2.0+?
Submitted: 2004-05-11 17:32 UTC Modified: 2004-08-05 10:54 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: php-contrib at i-ps dot net Assigned:
Status: Closed Package: Documentation problem
PHP Version: 4.3.6 OS: All
Private report: No CVE-ID: None
 [2004-05-11 17:32 UTC] php-contrib at i-ps dot net
Description:
------------
It is stated in the documentation that you no longer need to seed the random generator from PHP 4.2.0 onwards.

In mcrypt_create_iv it states that you must call srand() before using MCRYPT_RAND. Is this necessary with versions 4.2.0 onwards?

If it is, then it is not clear in the documentation that this is in exception of the above statement.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-08-05 10:54 UTC] dave@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.

Yes it is necessary with 4.2.0 onwards.
 [2020-02-07 06:11 UTC] phpdocbot@php.net
Automatic comment on behalf of dave
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=d96ddbed3063ae922e7ed5094cff6fb670b4b92a
Log: - Fix #28361 and encapsulate a few constants/filenames.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Nov 19 11:00:01 2025 UTC