The java.security.SecureRandom
class is widely used for generating cryptographically strong random numbers. Random number generation depends on a source of entropy such as signals, devices or inputs from hardware. Secure random number generation is also addressed by the rule MSC02-J. Generate strong random numbers.
The java.security.SecureRandom
class is widely used for generating cryptographically strong random numbers. According to the java.security
file present in the JRE's lib\security
folder:
...
An adversary should not be able to determine the original seed given several samples of random numbers. If that is not ensured, all future random numbers may be successfully predicted by the adversary.
Noncompliant Code Example
...
[TODO] | https://www.cigital.com/justice-league-blog/2009/08/14/proper-use-of-javas-securerandom/ |
[API 2011] |
...