public final class com.sun.crypto.provider.DHParameterGenerator extends java.security.AlgorithmParameterGeneratorSpi
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: com.sun.crypto.provider.DHParameterGenerator
super_class: java.security.AlgorithmParameterGeneratorSpi
{
private int primeSize;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private int exponentSize;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private java.security.SecureRandom random;
descriptor: Ljava/security/SecureRandom;
flags: (0x0002) ACC_PRIVATE
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.security.AlgorithmParameterGeneratorSpi.<init>:()V
1: aload 0
getstatic sun.security.util.SecurityProviderConstants.DEF_DH_KEY_SIZE:I
putfield com.sun.crypto.provider.DHParameterGenerator.primeSize:I
2: aload 0
iconst_0
putfield com.sun.crypto.provider.DHParameterGenerator.exponentSize:I
3: aload 0
aconst_null
putfield com.sun.crypto.provider.DHParameterGenerator.random:Ljava/security/SecureRandom;
4: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lcom/sun/crypto/provider/DHParameterGenerator;
private static void checkKeySize(int);
descriptor: (I)V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=5, locals=2, args_size=1
start local 0 0: iload 0
sipush 2048
if_icmpeq 3
iload 0
sipush 3072
if_icmpeq 3
1: iload 0
sipush 512
if_icmplt 2
iload 0
sipush 1024
if_icmpgt 2
iload 0
bipush 63
iand
ifeq 3
2: StackMap locals:
StackMap stack:
iconst_0
goto 4
StackMap locals:
StackMap stack:
3: iconst_1
StackMap locals:
StackMap stack: int
4: istore 1
start local 1 5: iload 1
ifne 11
6: new java.security.InvalidParameterException
dup
7: new java.lang.StringBuilder
dup
ldc "DH key size must be multiple of 64 and range from 512 to 1024 (inclusive), or 2048, 3072. The specific key size "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
8: iload 0
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
ldc " is not supported"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
9: invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
10: invokespecial java.security.InvalidParameterException.<init>:(Ljava/lang/String;)V
athrow
11: StackMap locals: int
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 keysize I
5 12 1 supported Z
Exceptions:
throws java.security.InvalidParameterException
MethodParameters:
Name Flags
keysize
protected void engineInit(int, java.security.SecureRandom);
descriptor: (ILjava/security/SecureRandom;)V
flags: (0x0004) ACC_PROTECTED
Code:
stack=2, locals=3, args_size=3
start local 0 start local 1 start local 2 0: iload 1
invokestatic com.sun.crypto.provider.DHParameterGenerator.checkKeySize:(I)V
1: aload 0
iload 1
putfield com.sun.crypto.provider.DHParameterGenerator.primeSize:I
2: aload 0
aload 2
putfield com.sun.crypto.provider.DHParameterGenerator.random:Ljava/security/SecureRandom;
3: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lcom/sun/crypto/provider/DHParameterGenerator;
0 4 1 keysize I
0 4 2 random Ljava/security/SecureRandom;
MethodParameters:
Name Flags
keysize
random
protected void engineInit(java.security.spec.AlgorithmParameterSpec, java.security.SecureRandom);
descriptor: (Ljava/security/spec/AlgorithmParameterSpec;Ljava/security/SecureRandom;)V
flags: (0x0004) ACC_PROTECTED
Code:
stack=5, locals=5, args_size=3
start local 0 start local 1 start local 2 0: aload 1
instanceof javax.crypto.spec.DHGenParameterSpec
ifne 4
1: new java.security.InvalidAlgorithmParameterException
dup
2: ldc "Inappropriate parameter type"
3: invokespecial java.security.InvalidAlgorithmParameterException.<init>:(Ljava/lang/String;)V
athrow
4: StackMap locals:
StackMap stack:
aload 1
checkcast javax.crypto.spec.DHGenParameterSpec
astore 3
start local 3 5: aload 0
aload 3
invokevirtual javax.crypto.spec.DHGenParameterSpec.getPrimeSize:()I
putfield com.sun.crypto.provider.DHParameterGenerator.primeSize:I
6: aload 0
aload 3
invokevirtual javax.crypto.spec.DHGenParameterSpec.getExponentSize:()I
putfield com.sun.crypto.provider.DHParameterGenerator.exponentSize:I
7: aload 0
getfield com.sun.crypto.provider.DHParameterGenerator.exponentSize:I
ifle 8
aload 0
getfield com.sun.crypto.provider.DHParameterGenerator.exponentSize:I
aload 0
getfield com.sun.crypto.provider.DHParameterGenerator.primeSize:I
if_icmplt 14
8: StackMap locals: javax.crypto.spec.DHGenParameterSpec
StackMap stack:
new java.security.InvalidAlgorithmParameterException
dup
9: new java.lang.StringBuilder
dup
ldc "Exponent size ("
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
getfield com.sun.crypto.provider.DHParameterGenerator.exponentSize:I
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
10: ldc ") must be positive and less than modulus size ("
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
11: aload 0
getfield com.sun.crypto.provider.DHParameterGenerator.primeSize:I
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
ldc ")"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
12: invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
13: invokespecial java.security.InvalidAlgorithmParameterException.<init>:(Ljava/lang/String;)V
athrow
14: StackMap locals:
StackMap stack:
aload 0
getfield com.sun.crypto.provider.DHParameterGenerator.primeSize:I
invokestatic com.sun.crypto.provider.DHParameterGenerator.checkKeySize:(I)V
15: goto 18
StackMap locals:
StackMap stack: java.security.InvalidParameterException
16: astore 4
start local 4 17: new java.security.InvalidAlgorithmParameterException
dup
aload 4
invokevirtual java.security.InvalidParameterException.getMessage:()Ljava/lang/String;
invokespecial java.security.InvalidAlgorithmParameterException.<init>:(Ljava/lang/String;)V
athrow
end local 4 18: StackMap locals:
StackMap stack:
aload 0
aload 2
putfield com.sun.crypto.provider.DHParameterGenerator.random:Ljava/security/SecureRandom;
19: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 20 0 this Lcom/sun/crypto/provider/DHParameterGenerator;
0 20 1 genParamSpec Ljava/security/spec/AlgorithmParameterSpec;
0 20 2 random Ljava/security/SecureRandom;
5 20 3 dhParamSpec Ljavax/crypto/spec/DHGenParameterSpec;
17 18 4 ipe Ljava/security/InvalidParameterException;
Exception table:
from to target type
14 15 16 Class java.security.InvalidParameterException
Exceptions:
throws java.security.InvalidAlgorithmParameterException
MethodParameters:
Name Flags
genParamSpec
random
protected java.security.AlgorithmParameters engineGenerateParameters();
descriptor: ()Ljava/security/AlgorithmParameters;
flags: (0x0004) ACC_PROTECTED
Code:
stack=5, locals=6, args_size=1
start local 0 0: aload 0
getfield com.sun.crypto.provider.DHParameterGenerator.exponentSize:I
ifne 2
1: aload 0
aload 0
getfield com.sun.crypto.provider.DHParameterGenerator.primeSize:I
iconst_1
isub
putfield com.sun.crypto.provider.DHParameterGenerator.exponentSize:I
2: StackMap locals:
StackMap stack:
aload 0
getfield com.sun.crypto.provider.DHParameterGenerator.random:Ljava/security/SecureRandom;
ifnonnull 4
3: aload 0
getstatic com.sun.crypto.provider.SunJCE.RANDOM:Ljava/security/SecureRandom;
putfield com.sun.crypto.provider.DHParameterGenerator.random:Ljava/security/SecureRandom;
4: StackMap locals:
StackMap stack:
ldc "DSA"
invokestatic java.security.AlgorithmParameterGenerator.getInstance:(Ljava/lang/String;)Ljava/security/AlgorithmParameterGenerator;
5: astore 1
start local 1 6: aload 1
aload 0
getfield com.sun.crypto.provider.DHParameterGenerator.primeSize:I
aload 0
getfield com.sun.crypto.provider.DHParameterGenerator.random:Ljava/security/SecureRandom;
invokevirtual java.security.AlgorithmParameterGenerator.init:(ILjava/security/SecureRandom;)V
7: aload 1
invokevirtual java.security.AlgorithmParameterGenerator.generateParameters:()Ljava/security/AlgorithmParameters;
astore 2
start local 2 8: aload 2
ldc Ljava/security/spec/DSAParameterSpec;
invokevirtual java.security.AlgorithmParameters.getParameterSpec:(Ljava/lang/Class;)Ljava/security/spec/AlgorithmParameterSpec;
checkcast java.security.spec.DSAParameterSpec
9: astore 3
start local 3 10: aload 0
getfield com.sun.crypto.provider.DHParameterGenerator.exponentSize:I
ifle 16
11: new javax.crypto.spec.DHParameterSpec
dup
aload 3
invokevirtual java.security.spec.DSAParameterSpec.getP:()Ljava/math/BigInteger;
12: aload 3
invokevirtual java.security.spec.DSAParameterSpec.getG:()Ljava/math/BigInteger;
13: aload 0
getfield com.sun.crypto.provider.DHParameterGenerator.exponentSize:I
14: invokespecial javax.crypto.spec.DHParameterSpec.<init>:(Ljava/math/BigInteger;Ljava/math/BigInteger;I)V
astore 4
start local 4 15: goto 19
end local 4 16: StackMap locals: java.security.AlgorithmParameterGenerator java.security.AlgorithmParameters java.security.spec.DSAParameterSpec
StackMap stack:
new javax.crypto.spec.DHParameterSpec
dup
aload 3
invokevirtual java.security.spec.DSAParameterSpec.getP:()Ljava/math/BigInteger;
17: aload 3
invokevirtual java.security.spec.DSAParameterSpec.getG:()Ljava/math/BigInteger;
18: invokespecial javax.crypto.spec.DHParameterSpec.<init>:(Ljava/math/BigInteger;Ljava/math/BigInteger;)V
astore 4
start local 4 19: StackMap locals: javax.crypto.spec.DHParameterSpec
StackMap stack:
ldc "DH"
ldc "SunJCE"
invokestatic java.security.AlgorithmParameters.getInstance:(Ljava/lang/String;Ljava/lang/String;)Ljava/security/AlgorithmParameters;
20: astore 5
start local 5 21: aload 5
aload 4
invokevirtual java.security.AlgorithmParameters.init:(Ljava/security/spec/AlgorithmParameterSpec;)V
22: aload 5
23: areturn
end local 5 end local 4 end local 3 end local 2 end local 1 24: StackMap locals: com.sun.crypto.provider.DHParameterGenerator
StackMap stack: java.lang.Exception
astore 1
start local 1 25: new java.security.ProviderException
dup
ldc "Unexpected exception"
aload 1
invokespecial java.security.ProviderException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 26 0 this Lcom/sun/crypto/provider/DHParameterGenerator;
6 24 1 dsaParamGen Ljava/security/AlgorithmParameterGenerator;
8 24 2 dsaParams Ljava/security/AlgorithmParameters;
10 24 3 dsaParamSpec Ljava/security/spec/DSAParameterSpec;
15 16 4 dhParamSpec Ljavax/crypto/spec/DHParameterSpec;
19 24 4 dhParamSpec Ljavax/crypto/spec/DHParameterSpec;
21 24 5 algParams Ljava/security/AlgorithmParameters;
25 26 1 ex Ljava/lang/Exception;
Exception table:
from to target type
4 23 24 Class java.lang.Exception
}
SourceFile: "DHParameterGenerator.java"