Random security
REV MEDIUM - 452
package org.example;
import java.util.Random;
public class App {
public static void main(String args[]) {
ReplicatedRandom rr = new ReplicatedRandom();
String num = "0.1608229152051377"; // string from server
// Assuming the argument is a string representing a double,
// replicate the Random that the double was generated from
if (rr.replicateState(Double.parseDouble(num))) {
System.out.println(rr.nextDouble());
}
return;
}
}Last updated
