[PR][php-src][#1078][master] - Move mcrypt_create_iv() to core as rand_bytes()
| From: | noreply@php.net | Date: | Fri, 13 Feb 2015 13:10:06 +0000 |
| Subject: | [PR][php-src][#1078][master] - Move mcrypt_create_iv() to core as rand_bytes() | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-2326@lists.php.net to get a copy of this message | ||
You can view the Pull Request on github:
https://github.com/php/php-src/pull/1078
Pull Request Description:
The implementation of
rand_bytes(int length [, int source]) is based on (and is fully
compatible with) mcrypt_create_iv(). I have taken the liberty of deprecating
mcrypt_create_iv() and making it an alias of rand_bytes()
5 new constants are registered for builds without mcrypt enabled:
* RNG_DEV_RANDOM
* RNG_DEV_URANDOM
* RNG_DEV_ARANDOM
* RNG_RAND
* RNG_MT_RAND
RANDOM, URANDOM and RAND directly translate to their MCRYPT_ equivelants. ARANDOM and MT_RAND are
enhancements to the function.
// TODO: Fix tests