[dev] rand() error in pear/Crypt/HCEMD5.php:96
Apis Hytt
php3dev@carousel.tabcat.com
Wed, 8 Nov 2000 22:01:51 -0600 (CST)
Thoughts on possible range error problem:
o As rand() is using int, we collide with underlying op-sys
limit for rand legal range
For example in Solaris stdlib.h there is defined:
RAND_MAX .. which is 2**32 which is much less than 1000000,
of course .. so we get the Invalid warning range error.
Tried 1,32767 and that was accepted as valid range .. but
that may disrupt unique enough values.
Apis
-nnnn-
On Wed, 8 Nov 2000, Apis Hytt wrote:
> Latest horde/imp 2.3.x-dev-cvs
>
> Warning: rand(): Invalid range 1..1000000 in Crypt/HCEMD5.php on line 96
NNNN