...
Rule MSC30-C. Do not use the rand() function for generating pseudorandom numbers addresses RNGs from a different perspective, which is the time until the first collision occurscycle of the random number sequence. In other words, during a single run of an RNG, the time interval after which the RNG generates the same random numbers. The rule MSC30-C deprecates the rand()
function, as it generates numbers that have a comparatively short cycle. The same rule proposes the use of the random()
function for POSIX and CryptGenRandom()
function for Windows.
...