php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #33982 add functionality for gmp_nextprime (includes patch)
Submitted: 2005-08-03 18:10 UTC Modified: 2006-08-27 16:25 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:2 (100.0%)
From: korte-php at et dot ruhr-uni-bochum dot de Assigned: stas (profile)
Status: Closed Package: Feature/Change Request
PHP Version: 4.4.0 OS: Linux
Private report: No CVE-ID: None
 [2005-08-03 18:10 UTC] korte-php at et dot ruhr-uni-bochum dot de
Description:
------------
In order to use the php-gmp functions for cryptographic purposes, having mpz_nextprime ist sort of essential.

Reproduce code:
---------------
url to patch (51 lines)
http://user.et-cip.rub.de/korte/php-4.4.0-gmp-nextprime.patch


Expected result:
----------------
Use like:

<?php
  $rand1 = gmp_random(10);
  echo "Random: " . gmp_strval($rand1) . "<br>\n";
  $prime1 = gmp_nextprime($rand1);
  echo "Next Prime: " . gmp_strval($prime1) . "<br>\n";
}
?> 

Actual result:
--------------
Working fine in our installation - would like to have in the normal distribution as well :)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-08-03 20:55 UTC] nlopess@php.net
seems to be a good addition to php 5.1.1!
 [2005-08-03 21:43 UTC] tony2001@php.net
Stas, please take a look at it.
Thanks.
 [2006-08-27 16:25 UTC] bjori@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

Fixed in 5.2 & above
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Feb 22 12:01:29 2024 UTC