< prev index next >

test/java/security/SecureRandom/EnoughSeedTest.java

Print this page

        

*** 25,35 **** * @test * @bug 8141039 * @library /lib/testlibrary * @summary Check SecureRandom generate expected seed counts what the caller * asked for. ! * @run main EnoughSeedTest */ import java.security.SecureRandom; import java.security.Security; import static java.lang.Math.*; --- 25,35 ---- * @test * @bug 8141039 * @library /lib/testlibrary * @summary Check SecureRandom generate expected seed counts what the caller * asked for. ! * @run main/othervm EnoughSeedTest */ import java.security.SecureRandom; import java.security.Security; import static java.lang.Math.*;
*** 38,47 **** --- 38,48 ---- private static final String DRBG_CONFIG = "securerandom.drbg.config"; private static final String DRBG_CONFIG_VALUE = Security.getProperty(DRBG_CONFIG); public static void main(String[] args) { + System.setProperty("java.security.egd", "file:/dev/urandom"); boolean success = true; for (String mech : new String[]{ "SHA1PRNG", "Hash_DRBG", "HMAC_DRBG", "CTR_DRBG"}) { System.out.printf("%nTest for SecureRandom algorithm: '%s'", mech);
< prev index next >