vendredi 16 juillet 2021

Is there an advantage of using Random() over Random.secure() if a cryptographically strong random number isn't required?

Dart has two different ways of generating random numbers. Random() and Random.secure(), where the former is pseudo random. With only this information, it seems obvious that Random.secure() should be used all the time to be sure that the number generated is completely random.

However, since both ways of generating a number exists, I suspect that there are advantages of using Random(). Is that correct, and what are those advantages in that case?




Aucun commentaire:

Enregistrer un commentaire