Created
June 20, 2018 15:46
-
-
Save cgundogan/a1268454e07c73bc5c4c0369b88604dc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.security.SecureRandom; | |
import java.security.Security; | |
import java.util.Arrays; | |
public class SHA1PRNGTEST { | |
public static void main(String args[]) throws Exception { | |
SecureRandom random = SecureRandom.getInstance("SHA1PRNG"); | |
random.setSeed(1); | |
int number = 0; | |
for (int i = 0; i < 20; i++) { | |
number = random.nextInt(); | |
System.out.print(Integer.toUnsignedString(number) + " "); | |
} | |
System.out.println(""); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment