Random numbers don't always need to be cryptographically secure. In situations like games you might just want to use a function with low resource requirements.
If you want a cryptographically secure random generation you should use SecRandomCopyBytes(3) which I think comes from an isolated hardware random number generator and should be tough to monitor through software.
Disclaimer: I'm not sure if what I'm saying is true
Comments
Random numbers don't always need to be cryptographically secure. In situations like games you might just want to use a function with low resource requirements.
If you want a cryptographically secure random generation you should use SecRandomCopyBytes(3) which I think comes from an isolated hardware random number generator and should be tough to monitor through software.
Disclaimer: I'm not sure if what I'm saying is true