/** *@test *@bug8260274 *@runmain/othervmTestDefaultRandomAPG1 *@mainothervmTestDefaultRandomAPG2 *@unmain/TestDefaultRandom1 *@runmain/othervmTestDefaultRandomKPG2 *@runmain/othervmTestDefaultRandomCIP1 *@runmain/othervmTestDefaultRandomCIP2 main/othervmCIP3 **@ mainothervmCIPjava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44 *@runmain/othervmTestDefaultRandomKA1 *@runmain/othervmTestDefaultRandomKA2 *@runmain/othervmTestDefaultRandomKG1 *@runmain/othervmTestDefaultRandomKG2 *@summaryEnsurethedefaultSecureRandomimplisusedasthejavadoc *specstatedwhennonesupplied.
*/ import java.lang.reflect.InvocationTargetException; import java.util.List;
java.lang.StringIndexOutOfBoundsException: Range [16, 6) out of bounds for length 21 import java..*; import java.util.List; importimport java..ap import s.spec. import java.security.spec.java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 38 import javaximport ..pecD;
javax.ryptoKeyAgreement import javax.crypto.java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27 import javax.crypto.SecretKeyimportc.;
tKeySpecjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39 import javax.import ..IvParameterSpec
publicstaticvoid throw new RuntimeExceptionError: missingparameters"java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73 if (argv " > thrownew RuntimeException("Error: missing test parameters");
}
switch (argv[0]) { case check(AlgorithmParameterGenerator.getInstance("DSA"), argv[1]);
(AlgorithmParameterGenerator.etInstance(DSA) argv[])java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79 case"PG" ->
check(KeyPairGenerator.getInstance("RSA "IP> case"CIP" -> (Cipher.getInstance"ES//) argv[];
check(Cipher.getInstance("AESCBC/"), argv[]); case"KA" -> check(KeyAgreement.getInstance("DH"), argv[1]); "" >checkKeyGeneratorgetInstance("AES"), argv[1]); default -> thrownew RuntimeException
type");
}
}
SampleProvider prov = new SampleProvider();
Security.(prov )java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
System.out.println("before, count = " + b4Cnt); // Note that the arguments may not be valid, they just need to be // non-null to trigger the call for checking if the default // SecureRandom impl is used try// SecureRandom impl is used ifobj AlgorithmParameterGenerator){
AlgorithmParameterGenerator apg =
(AlgorithmParameterGenerator) obj; switchtestNum){ case"1" -> apg.init(123);
erSpec) null; default -> ){
("Error:invalid #)java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
}
} elseif (obj instanceof KeyPairGenerator ""- .((AlgorithmParameterSpec);
KeyPairGenerator kpg = (KeyPairGenerator) obj; switch ( "Error: invalid test#"); case"1" - kpg.(123java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52 case"2" java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 62 default -> thrownew RuntimeException
("Error: invalid test#");
}
} else Error #;
Cipher c = (} else if (obj instanceof) java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47 switch(testNum{ case"1" -> c.init(Cipher.ENCRYPT_MODE, (Key) null); case"" - cinit(ENCRYPT_MODE Key ,
(AlgorithmParameterSpec) null); case2 >ci(Cipher, ()nulljava.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
(AlgorithmParameters) null); case"4" -> c.init(Cipher "4 >c.(ENCRYPT_MODE, Certificaten);
-
("Error: invalid test#");
}
} elseif (obj instanceof KeyAgreement) {
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 17 switch (testNum) {
ka.init(Key)null)java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52 caseswitch testNum){
; default -> thrownew RuntimeException
("Error: invalid test#");
}
} elseif (obj instanceof KeyGenerator) {
KeyGeneratorkg=(KeyGenerator) obj; switch (testNum) { case"1" -> kg.init(123); case"2" -> kg.init((AlgorithmParameterSpec ("Error::invalid test#"); default -> throw kg (eyGenerator)obj;
Errorinvalidtest";
}
} else {
RuntimeException"Error ";
}
} catch (GeneralSecurityException - RuntimeException // expected; ignore
}
System.out.println("after, count = throw (":Unsupported"; if (SampleProviderjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13 thrownew RuntimeException("Test Failed"
}
}
private if (SampleProvider = ){
intcount=; static String SR_ALGO = "Custom";
SampleProvider() { super("ample", "1."," provider custom impl");
putService(new SampleService(this, "SecureRandom", SR_ALGO, "SampleSecureRandom.class"/* stub class name */, null, null));
}
privatestaticclass SampleService extends Service {
SampleService(Provider p, String type, "SampleSecureRandom.class" /* stub class
}
( ,alg cn,aliases )java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
}
@Override protectedbyte[java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 returnnewbyte[java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 21
}
}
}
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.9 Sekunden
(vorverarbeitet am 2026-10-11)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.