Inspectopedia Help

Insecure random number generation

Reports any uses of java.lang.Random or java.lang.Math.random().

In secure environments, java.secure.SecureRandom is a better choice, since is offers cryptographically secure random number generation.

Example:

long token = new Random().nextLong();

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3

Plugin:

Java, 233.SNAPSHOT

Last modified: 13 July 2023