An easy-to-use Python script to sync up with the state of a java.util.Random
generator after supplying a few samples. The internal seed has 48 bits, and every sample you give to the program will give some amount of bits of information. Here is a table to get an idea of how many samples you should provide per amount of bits in your input number:
bits | bound | samples (±) |
---|---|---|
4 | 16 | 25 |
6 | 64 | 12 |
8 | 256 | 8 |
16 | 65536 | 4 |