Skip to content

Latest commit

 

History

History
10 lines (7 loc) · 770 Bytes

README.md

File metadata and controls

10 lines (7 loc) · 770 Bytes

Cracking java.util.Random

This is a very simple program demonstrating how easy it is to predict the output of the java.util.Random class.
I take zero credit for this; the code was lifted and adapted from this blog entry and its comments:

This program works successfully in Java 8, and I believe also in Java 7 but I haven't checked. I'm pretty certain it won't work on Java 6, because some of the constants in the java.util.Random class have changed, but it should be trivial to adapt it to that (the original blog entry used the Java 6 values after all).