nrand48 replacement
This is the POSIX linear congruential pseudo-random generator with 48-bits of state. It is non-secure/reproducible and thread-safe. rand() is not thread-safe and *ahem* must not be used in VLC code. rand_r() is thread-safe but obsoleted in POSIX.2008. For secure random numbers, use the slower vlc_rand_bytes(). vlc_rand_bytes() can also be used to generate the seed if you are short on idea for a 48-bits pseudo-random value.
Showing
compat/nrand48.c
0 → 100644
Please register or sign in to comment