Created
October 19, 2020 19:30
-
-
Save banterCZ/36712a9741fa7ff5a819e7009c148270 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
public class SecureRandomTest { | |
public static void main(String[] args) { | |
System.out.println("SecureRandom Test"); | |
final SecureRandom random = new SecureRandom(); // Default: Win - SHA1PRNG, Linux/maxOS - NativePRNG | |
// final SecureRandom random = SecureRandom.getInstance("NativePRNGNonBlocking"); | |
System.out.println("Algorithm: " + random.getAlgorithm()); | |
for (int i = 0; i < 100; i++) { | |
System.out.print('.'); | |
final byte[] seed = random.generateSeed(2 * 8); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment