#33982 [Opn]: add functionality for gmp_nextprime (includes patch)
| From: | nlopess@php.net | Date: | Wed, 03 Aug 2005 18:55:42 +0000 |
| Subject: | #33982 [Opn]: add functionality for gmp_nextprime (includes patch) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-82905@lists.php.net to get a copy of this message | ||
ID: 33982
Updated by: nlopess@php.net
Reported By: korte-php at et dot ruhr-uni-bochum dot de
Status: Open
Bug Type: Math related
Operating System: Linux
PHP Version: 4.4.0
New Comment:
seems to be a good addition to php 5.1.1!
Previous Comments:
------------------------------------------------------------------------
[2005-08-03 18:10:36] 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 :)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33982&edit=1