#33982 [Asn]: add functionality for gmp_nextprime (includes patch)
ID: 33982
Updated by: tony2001@php.net
Reported By: korte-php at et dot ruhr-uni-bochum dot de
Status: Assigned
Bug Type: Math related
Operating System: Linux
PHP Version: 4.4.0
Assigned To: stas
New Comment:
Stas, please take a look at it.
Thanks.
Previous Comments:
------------------------------------------------------------------------
[2005-08-03 20:55:41] nlopess@php.net
seems to be a good addition to php 5.1.1!
------------------------------------------------------------------------
[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
Thread (5 messages)