Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between arc4random and random?

What's the difference between arc4random and random?

like image 373
dontWatchMyProfile Avatar asked May 08 '10 13:05

dontWatchMyProfile


1 Answers

random is known to be predictable and thus not to be used for secure pseudo-random number generation. arc4random is a newer, less predictable pseudo-random number generator. If you are not using it for anything secure, random will work fine.

like image 153
coneybeare Avatar answered Oct 05 '22 20:10

coneybeare