Skip to content
  • Rémi Denis-Courmont's avatar
    nrand48 replacement · 6268a229
    Rémi Denis-Courmont authored
    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.
    6268a229