public final class sun.security.rsa.RSAKeyFactory extends java.security.KeyFactorySpi
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: sun.security.rsa.RSAKeyFactory
super_class: java.security.KeyFactorySpi
{
private static final java.lang.Class<?> rsaPublicKeySpecClass;
descriptor: Ljava/lang/Class;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
Signature: Ljava/lang/Class<*>;
private static final java.lang.Class<?> rsaPrivateKeySpecClass;
descriptor: Ljava/lang/Class;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
Signature: Ljava/lang/Class<*>;
private static final java.lang.Class<?> rsaPrivateCrtKeySpecClass;
descriptor: Ljava/lang/Class;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
Signature: Ljava/lang/Class<*>;
private static final java.lang.Class<?> x509KeySpecClass;
descriptor: Ljava/lang/Class;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
Signature: Ljava/lang/Class<*>;
private static final java.lang.Class<?> pkcs8KeySpecClass;
descriptor: Ljava/lang/Class;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
Signature: Ljava/lang/Class<*>;
public static final int MIN_MODLEN;
descriptor: I
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: 512
public static final int MAX_MODLEN;
descriptor: I
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: 16384
public static final int MAX_MODLEN_RESTRICT_EXP;
descriptor: I
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: 3072
public static final int MAX_RESTRICTED_EXPLEN;
descriptor: I
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: 64
private static final boolean restrictExpLen;
descriptor: Z
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final sun.security.rsa.RSAKeyFactory INSTANCE;
descriptor: Lsun/security/rsa/RSAKeyFactory;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=3, locals=0, args_size=0
0: ldc Ljava/security/spec/RSAPublicKeySpec;
1: putstatic sun.security.rsa.RSAKeyFactory.rsaPublicKeySpecClass:Ljava/lang/Class;
2: ldc Ljava/security/spec/RSAPrivateKeySpec;
3: putstatic sun.security.rsa.RSAKeyFactory.rsaPrivateKeySpecClass:Ljava/lang/Class;
4: ldc Ljava/security/spec/RSAPrivateCrtKeySpec;
5: putstatic sun.security.rsa.RSAKeyFactory.rsaPrivateCrtKeySpecClass:Ljava/lang/Class;
6: ldc Ljava/security/spec/X509EncodedKeySpec;
putstatic sun.security.rsa.RSAKeyFactory.x509KeySpecClass:Ljava/lang/Class;
7: ldc Ljava/security/spec/PKCS8EncodedKeySpec;
putstatic sun.security.rsa.RSAKeyFactory.pkcs8KeySpecClass:Ljava/lang/Class;
8: ldc "true"
9: ldc "sun.security.rsa.restrictRSAExponent"
ldc "true"
10: invokestatic sun.security.action.GetPropertyAction.privilegedGetProperty:(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
invokevirtual java.lang.String.equalsIgnoreCase:(Ljava/lang/String;)Z
11: putstatic sun.security.rsa.RSAKeyFactory.restrictExpLen:Z
12: new sun.security.rsa.RSAKeyFactory
dup
invokespecial sun.security.rsa.RSAKeyFactory.<init>:()V
putstatic sun.security.rsa.RSAKeyFactory.INSTANCE:Lsun/security/rsa/RSAKeyFactory;
return
LocalVariableTable:
Start End Slot Name Signature
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.security.KeyFactorySpi.<init>:()V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lsun/security/rsa/RSAKeyFactory;
public static java.security.interfaces.RSAKey toRSAKey(java.security.Key);
descriptor: (Ljava/security/Key;)Ljava/security/interfaces/RSAKey;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
instanceof sun.security.rsa.RSAPrivateKeyImpl
ifne 3
1: aload 0
instanceof sun.security.rsa.RSAPrivateCrtKeyImpl
ifne 3
2: aload 0
instanceof sun.security.rsa.RSAPublicKeyImpl
ifeq 4
3: StackMap locals:
StackMap stack:
aload 0
checkcast java.security.interfaces.RSAKey
areturn
4: StackMap locals:
StackMap stack:
getstatic sun.security.rsa.RSAKeyFactory.INSTANCE:Lsun/security/rsa/RSAKeyFactory;
aload 0
invokevirtual sun.security.rsa.RSAKeyFactory.engineTranslateKey:(Ljava/security/Key;)Ljava/security/Key;
checkcast java.security.interfaces.RSAKey
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 key Ljava/security/Key;
Exceptions:
throws java.security.InvalidKeyException
MethodParameters:
Name Flags
key
static void checkRSAProviderKeyLengths(int, java.math.BigInteger);
descriptor: (ILjava/math/BigInteger;)V
flags: (0x0008) ACC_STATIC
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: iload 0
bipush 7
iadd
bipush -8
iand
aload 1
1: sipush 512
ldc 2147483647
2: invokestatic sun.security.rsa.RSAKeyFactory.checkKeyLengths:(ILjava/math/BigInteger;II)V
3: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 modulusLen I
0 4 1 exponent Ljava/math/BigInteger;
Exceptions:
throws java.security.InvalidKeyException
MethodParameters:
Name Flags
modulusLen
exponent
public static void checkKeyLengths(int, java.math.BigInteger, int, int);
descriptor: (ILjava/math/BigInteger;II)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=5, locals=5, args_size=4
start local 0 start local 1 start local 2 start local 3 0: iload 2
ifle 4
iload 0
iload 2
if_icmpge 4
1: new java.security.InvalidKeyException
dup
new java.lang.StringBuilder
dup
ldc "RSA keys must be at least "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
2: iload 2
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
ldc " bits long"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
3: invokespecial java.security.InvalidKeyException.<init>:(Ljava/lang/String;)V
athrow
4: StackMap locals:
StackMap stack:
iload 3
sipush 16384
invokestatic java.lang.Math.min:(II)I
istore 4
start local 4 5: iload 0
iload 4
if_icmple 9
6: new java.security.InvalidKeyException
dup
7: new java.lang.StringBuilder
dup
ldc "RSA keys must be no longer than "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
iload 4
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
ldc " bits"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
8: invokespecial java.security.InvalidKeyException.<init>:(Ljava/lang/String;)V
athrow
9: StackMap locals: int
StackMap stack:
getstatic sun.security.rsa.RSAKeyFactory.restrictExpLen:Z
ifeq 15
aload 1
ifnull 15
10: iload 0
sipush 3072
if_icmple 15
11: aload 1
invokevirtual java.math.BigInteger.bitLength:()I
bipush 64
if_icmple 15
12: new java.security.InvalidKeyException
dup
13: ldc "RSA exponents can be no longer than 64 bits if modulus is greater than 3072 bits"
14: invokespecial java.security.InvalidKeyException.<init>:(Ljava/lang/String;)V
athrow
15: StackMap locals:
StackMap stack:
return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 16 0 modulusLen I
0 16 1 exponent Ljava/math/BigInteger;
0 16 2 minModulusLen I
0 16 3 maxModulusLen I
5 16 4 maxLen I
Exceptions:
throws java.security.InvalidKeyException
MethodParameters:
Name Flags
modulusLen
exponent
minModulusLen
maxModulusLen
protected java.security.Key engineTranslateKey(java.security.Key);
descriptor: (Ljava/security/Key;)Ljava/security/Key;
flags: (0x0004) ACC_PROTECTED
Code:
stack=5, locals=3, args_size=2
start local 0 start local 1 0: aload 1
ifnonnull 2
1: new java.security.InvalidKeyException
dup
ldc "Key must not be null"
invokespecial java.security.InvalidKeyException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
aload 1
invokeinterface java.security.Key.getAlgorithm:()Ljava/lang/String;
astore 2
start local 2 3: aload 2
ldc "RSA"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 5
4: new java.security.InvalidKeyException
dup
new java.lang.StringBuilder
dup
ldc "Not an RSA key: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 2
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.security.InvalidKeyException.<init>:(Ljava/lang/String;)V
athrow
5: StackMap locals: java.lang.String
StackMap stack:
aload 1
instanceof java.security.PublicKey
ifeq 7
6: aload 0
aload 1
checkcast java.security.PublicKey
invokevirtual sun.security.rsa.RSAKeyFactory.translatePublicKey:(Ljava/security/PublicKey;)Ljava/security/PublicKey;
areturn
7: StackMap locals:
StackMap stack:
aload 1
instanceof java.security.PrivateKey
ifeq 9
8: aload 0
aload 1
checkcast java.security.PrivateKey
invokevirtual sun.security.rsa.RSAKeyFactory.translatePrivateKey:(Ljava/security/PrivateKey;)Ljava/security/PrivateKey;
areturn
9: StackMap locals:
StackMap stack:
new java.security.InvalidKeyException
dup
ldc "Neither a public nor a private key"
invokespecial java.security.InvalidKeyException.<init>:(Ljava/lang/String;)V
athrow
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Lsun/security/rsa/RSAKeyFactory;
0 10 1 key Ljava/security/Key;
3 10 2 keyAlg Ljava/lang/String;
Exceptions:
throws java.security.InvalidKeyException
MethodParameters:
Name Flags
key
protected java.security.PublicKey engineGeneratePublic(java.security.spec.KeySpec);
descriptor: (Ljava/security/spec/KeySpec;)Ljava/security/PublicKey;
flags: (0x0004) ACC_PROTECTED
Code:
stack=3, locals=3, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokevirtual sun.security.rsa.RSAKeyFactory.generatePublic:(Ljava/security/spec/KeySpec;)Ljava/security/PublicKey;
1: areturn
2: StackMap locals:
StackMap stack: java.security.spec.InvalidKeySpecException
astore 2
start local 2 3: aload 2
athrow
end local 2 4: StackMap locals:
StackMap stack: java.security.GeneralSecurityException
astore 2
start local 2 5: new java.security.spec.InvalidKeySpecException
dup
aload 2
invokespecial java.security.spec.InvalidKeySpecException.<init>:(Ljava/lang/Throwable;)V
athrow
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lsun/security/rsa/RSAKeyFactory;
0 6 1 keySpec Ljava/security/spec/KeySpec;
3 4 2 e Ljava/security/spec/InvalidKeySpecException;
5 6 2 e Ljava/security/GeneralSecurityException;
Exception table:
from to target type
0 1 2 Class java.security.spec.InvalidKeySpecException
0 1 4 Class java.security.GeneralSecurityException
Exceptions:
throws java.security.spec.InvalidKeySpecException
MethodParameters:
Name Flags
keySpec
protected java.security.PrivateKey engineGeneratePrivate(java.security.spec.KeySpec);
descriptor: (Ljava/security/spec/KeySpec;)Ljava/security/PrivateKey;
flags: (0x0004) ACC_PROTECTED
Code:
stack=3, locals=3, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokevirtual sun.security.rsa.RSAKeyFactory.generatePrivate:(Ljava/security/spec/KeySpec;)Ljava/security/PrivateKey;
1: areturn
2: StackMap locals:
StackMap stack: java.security.spec.InvalidKeySpecException
astore 2
start local 2 3: aload 2
athrow
end local 2 4: StackMap locals:
StackMap stack: java.security.GeneralSecurityException
astore 2
start local 2 5: new java.security.spec.InvalidKeySpecException
dup
aload 2
invokespecial java.security.spec.InvalidKeySpecException.<init>:(Ljava/lang/Throwable;)V
athrow
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lsun/security/rsa/RSAKeyFactory;
0 6 1 keySpec Ljava/security/spec/KeySpec;
3 4 2 e Ljava/security/spec/InvalidKeySpecException;
5 6 2 e Ljava/security/GeneralSecurityException;
Exception table:
from to target type
0 1 2 Class java.security.spec.InvalidKeySpecException
0 1 4 Class java.security.GeneralSecurityException
Exceptions:
throws java.security.spec.InvalidKeySpecException
MethodParameters:
Name Flags
keySpec
private java.security.PublicKey translatePublicKey(java.security.PublicKey);
descriptor: (Ljava/security/PublicKey;)Ljava/security/PublicKey;
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=4, args_size=2
start local 0 start local 1 0: aload 1
instanceof java.security.interfaces.RSAPublicKey
ifeq 11
1: aload 1
instanceof sun.security.rsa.RSAPublicKeyImpl
ifeq 3
2: aload 1
areturn
3: StackMap locals:
StackMap stack:
aload 1
checkcast java.security.interfaces.RSAPublicKey
astore 2
start local 2 4: new sun.security.rsa.RSAPublicKeyImpl
dup
5: aload 2
invokeinterface java.security.interfaces.RSAPublicKey.getModulus:()Ljava/math/BigInteger;
6: aload 2
invokeinterface java.security.interfaces.RSAPublicKey.getPublicExponent:()Ljava/math/BigInteger;
7: invokespecial sun.security.rsa.RSAPublicKeyImpl.<init>:(Ljava/math/BigInteger;Ljava/math/BigInteger;)V
8: areturn
9: StackMap locals: sun.security.rsa.RSAKeyFactory java.security.PublicKey java.security.interfaces.RSAPublicKey
StackMap stack: java.lang.RuntimeException
astore 3
start local 3 10: new java.security.InvalidKeyException
dup
ldc "Invalid key"
aload 3
invokespecial java.security.InvalidKeyException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 3 end local 2 11: StackMap locals:
StackMap stack:
ldc "X.509"
aload 1
invokeinterface java.security.PublicKey.getFormat:()Ljava/lang/String;
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 14
12: aload 1
invokeinterface java.security.PublicKey.getEncoded:()[B
astore 2
start local 2 13: new sun.security.rsa.RSAPublicKeyImpl
dup
aload 2
invokespecial sun.security.rsa.RSAPublicKeyImpl.<init>:([B)V
areturn
end local 2 14: StackMap locals:
StackMap stack:
new java.security.InvalidKeyException
dup
ldc "Public keys must be instance of RSAPublicKey or have X.509 encoding"
invokespecial java.security.InvalidKeyException.<init>:(Ljava/lang/String;)V
athrow
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 15 0 this Lsun/security/rsa/RSAKeyFactory;
0 15 1 key Ljava/security/PublicKey;
4 11 2 rsaKey Ljava/security/interfaces/RSAPublicKey;
10 11 3 e Ljava/lang/RuntimeException;
13 14 2 encoded [B
Exception table:
from to target type
4 8 9 Class java.lang.RuntimeException
Exceptions:
throws java.security.InvalidKeyException
MethodParameters:
Name Flags
key
private java.security.PrivateKey translatePrivateKey(java.security.PrivateKey);
descriptor: (Ljava/security/PrivateKey;)Ljava/security/PrivateKey;
flags: (0x0002) ACC_PRIVATE
Code:
stack=10, locals=4, args_size=2
start local 0 start local 1 0: aload 1
instanceof java.security.interfaces.RSAPrivateCrtKey
ifeq 17
1: aload 1
instanceof sun.security.rsa.RSAPrivateCrtKeyImpl
ifeq 3
2: aload 1
areturn
3: StackMap locals:
StackMap stack:
aload 1
checkcast java.security.interfaces.RSAPrivateCrtKey
astore 2
start local 2 4: new sun.security.rsa.RSAPrivateCrtKeyImpl
dup
5: aload 2
invokeinterface java.security.interfaces.RSAPrivateCrtKey.getModulus:()Ljava/math/BigInteger;
6: aload 2
invokeinterface java.security.interfaces.RSAPrivateCrtKey.getPublicExponent:()Ljava/math/BigInteger;
7: aload 2
invokeinterface java.security.interfaces.RSAPrivateCrtKey.getPrivateExponent:()Ljava/math/BigInteger;
8: aload 2
invokeinterface java.security.interfaces.RSAPrivateCrtKey.getPrimeP:()Ljava/math/BigInteger;
9: aload 2
invokeinterface java.security.interfaces.RSAPrivateCrtKey.getPrimeQ:()Ljava/math/BigInteger;
10: aload 2
invokeinterface java.security.interfaces.RSAPrivateCrtKey.getPrimeExponentP:()Ljava/math/BigInteger;
11: aload 2
invokeinterface java.security.interfaces.RSAPrivateCrtKey.getPrimeExponentQ:()Ljava/math/BigInteger;
12: aload 2
invokeinterface java.security.interfaces.RSAPrivateCrtKey.getCrtCoefficient:()Ljava/math/BigInteger;
13: invokespecial sun.security.rsa.RSAPrivateCrtKeyImpl.<init>:(Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;)V
14: areturn
15: StackMap locals: sun.security.rsa.RSAKeyFactory java.security.PrivateKey java.security.interfaces.RSAPrivateCrtKey
StackMap stack: java.lang.RuntimeException
astore 3
start local 3 16: new java.security.InvalidKeyException
dup
ldc "Invalid key"
aload 3
invokespecial java.security.InvalidKeyException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 3 end local 2 17: StackMap locals:
StackMap stack:
aload 1
instanceof java.security.interfaces.RSAPrivateKey
ifeq 28
18: aload 1
instanceof sun.security.rsa.RSAPrivateKeyImpl
ifeq 20
19: aload 1
areturn
20: StackMap locals:
StackMap stack:
aload 1
checkcast java.security.interfaces.RSAPrivateKey
astore 2
start local 2 21: new sun.security.rsa.RSAPrivateKeyImpl
dup
22: aload 2
invokeinterface java.security.interfaces.RSAPrivateKey.getModulus:()Ljava/math/BigInteger;
23: aload 2
invokeinterface java.security.interfaces.RSAPrivateKey.getPrivateExponent:()Ljava/math/BigInteger;
24: invokespecial sun.security.rsa.RSAPrivateKeyImpl.<init>:(Ljava/math/BigInteger;Ljava/math/BigInteger;)V
25: areturn
26: StackMap locals: sun.security.rsa.RSAKeyFactory java.security.PrivateKey java.security.interfaces.RSAPrivateKey
StackMap stack: java.lang.RuntimeException
astore 3
start local 3 27: new java.security.InvalidKeyException
dup
ldc "Invalid key"
aload 3
invokespecial java.security.InvalidKeyException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 3 end local 2 28: StackMap locals:
StackMap stack:
ldc "PKCS#8"
aload 1
invokeinterface java.security.PrivateKey.getFormat:()Ljava/lang/String;
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 31
29: aload 1
invokeinterface java.security.PrivateKey.getEncoded:()[B
astore 2
start local 2 30: aload 2
invokestatic sun.security.rsa.RSAPrivateCrtKeyImpl.newKey:([B)Ljava/security/interfaces/RSAPrivateKey;
areturn
end local 2 31: StackMap locals:
StackMap stack:
new java.security.InvalidKeyException
dup
ldc "Private keys must be instance of RSAPrivate(Crt)Key or have PKCS#8 encoding"
invokespecial java.security.InvalidKeyException.<init>:(Ljava/lang/String;)V
athrow
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 32 0 this Lsun/security/rsa/RSAKeyFactory;
0 32 1 key Ljava/security/PrivateKey;
4 17 2 rsaKey Ljava/security/interfaces/RSAPrivateCrtKey;
16 17 3 e Ljava/lang/RuntimeException;
21 28 2 rsaKey Ljava/security/interfaces/RSAPrivateKey;
27 28 3 e Ljava/lang/RuntimeException;
30 31 2 encoded [B
Exception table:
from to target type
4 14 15 Class java.lang.RuntimeException
21 25 26 Class java.lang.RuntimeException
Exceptions:
throws java.security.InvalidKeyException
MethodParameters:
Name Flags
key
private java.security.PublicKey generatePublic(java.security.spec.KeySpec);
descriptor: (Ljava/security/spec/KeySpec;)Ljava/security/PublicKey;
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=3, args_size=2
start local 0 start local 1 0: aload 1
instanceof java.security.spec.X509EncodedKeySpec
ifeq 3
1: aload 1
checkcast java.security.spec.X509EncodedKeySpec
astore 2
start local 2 2: new sun.security.rsa.RSAPublicKeyImpl
dup
aload 2
invokevirtual java.security.spec.X509EncodedKeySpec.getEncoded:()[B
invokespecial sun.security.rsa.RSAPublicKeyImpl.<init>:([B)V
areturn
end local 2 3: StackMap locals:
StackMap stack:
aload 1
instanceof java.security.spec.RSAPublicKeySpec
ifeq 9
4: aload 1
checkcast java.security.spec.RSAPublicKeySpec
astore 2
start local 2 5: new sun.security.rsa.RSAPublicKeyImpl
dup
6: aload 2
invokevirtual java.security.spec.RSAPublicKeySpec.getModulus:()Ljava/math/BigInteger;
7: aload 2
invokevirtual java.security.spec.RSAPublicKeySpec.getPublicExponent:()Ljava/math/BigInteger;
8: invokespecial sun.security.rsa.RSAPublicKeyImpl.<init>:(Ljava/math/BigInteger;Ljava/math/BigInteger;)V
areturn
end local 2 9: StackMap locals:
StackMap stack:
new java.security.spec.InvalidKeySpecException
dup
ldc "Only RSAPublicKeySpec and X509EncodedKeySpec supported for RSA public keys"
invokespecial java.security.spec.InvalidKeySpecException.<init>:(Ljava/lang/String;)V
athrow
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Lsun/security/rsa/RSAKeyFactory;
0 10 1 keySpec Ljava/security/spec/KeySpec;
2 3 2 x509Spec Ljava/security/spec/X509EncodedKeySpec;
5 9 2 rsaSpec Ljava/security/spec/RSAPublicKeySpec;
Exceptions:
throws java.security.GeneralSecurityException
MethodParameters:
Name Flags
keySpec
private java.security.PrivateKey generatePrivate(java.security.spec.KeySpec);
descriptor: (Ljava/security/spec/KeySpec;)Ljava/security/PrivateKey;
flags: (0x0002) ACC_PRIVATE
Code:
stack=10, locals=3, args_size=2
start local 0 start local 1 0: aload 1
instanceof java.security.spec.PKCS8EncodedKeySpec
ifeq 3
1: aload 1
checkcast java.security.spec.PKCS8EncodedKeySpec
astore 2
start local 2 2: aload 2
invokevirtual java.security.spec.PKCS8EncodedKeySpec.getEncoded:()[B
invokestatic sun.security.rsa.RSAPrivateCrtKeyImpl.newKey:([B)Ljava/security/interfaces/RSAPrivateKey;
areturn
end local 2 3: StackMap locals:
StackMap stack:
aload 1
instanceof java.security.spec.RSAPrivateCrtKeySpec
ifeq 15
4: aload 1
checkcast java.security.spec.RSAPrivateCrtKeySpec
astore 2
start local 2 5: new sun.security.rsa.RSAPrivateCrtKeyImpl
dup
6: aload 2
invokevirtual java.security.spec.RSAPrivateCrtKeySpec.getModulus:()Ljava/math/BigInteger;
7: aload 2
invokevirtual java.security.spec.RSAPrivateCrtKeySpec.getPublicExponent:()Ljava/math/BigInteger;
8: aload 2
invokevirtual java.security.spec.RSAPrivateCrtKeySpec.getPrivateExponent:()Ljava/math/BigInteger;
9: aload 2
invokevirtual java.security.spec.RSAPrivateCrtKeySpec.getPrimeP:()Ljava/math/BigInteger;
10: aload 2
invokevirtual java.security.spec.RSAPrivateCrtKeySpec.getPrimeQ:()Ljava/math/BigInteger;
11: aload 2
invokevirtual java.security.spec.RSAPrivateCrtKeySpec.getPrimeExponentP:()Ljava/math/BigInteger;
12: aload 2
invokevirtual java.security.spec.RSAPrivateCrtKeySpec.getPrimeExponentQ:()Ljava/math/BigInteger;
13: aload 2
invokevirtual java.security.spec.RSAPrivateCrtKeySpec.getCrtCoefficient:()Ljava/math/BigInteger;
14: invokespecial sun.security.rsa.RSAPrivateCrtKeyImpl.<init>:(Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;)V
areturn
end local 2 15: StackMap locals:
StackMap stack:
aload 1
instanceof java.security.spec.RSAPrivateKeySpec
ifeq 21
16: aload 1
checkcast java.security.spec.RSAPrivateKeySpec
astore 2
start local 2 17: new sun.security.rsa.RSAPrivateKeyImpl
dup
18: aload 2
invokevirtual java.security.spec.RSAPrivateKeySpec.getModulus:()Ljava/math/BigInteger;
19: aload 2
invokevirtual java.security.spec.RSAPrivateKeySpec.getPrivateExponent:()Ljava/math/BigInteger;
20: invokespecial sun.security.rsa.RSAPrivateKeyImpl.<init>:(Ljava/math/BigInteger;Ljava/math/BigInteger;)V
areturn
end local 2 21: StackMap locals:
StackMap stack:
new java.security.spec.InvalidKeySpecException
dup
ldc "Only RSAPrivate(Crt)KeySpec and PKCS8EncodedKeySpec supported for RSA private keys"
invokespecial java.security.spec.InvalidKeySpecException.<init>:(Ljava/lang/String;)V
athrow
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 22 0 this Lsun/security/rsa/RSAKeyFactory;
0 22 1 keySpec Ljava/security/spec/KeySpec;
2 3 2 pkcsSpec Ljava/security/spec/PKCS8EncodedKeySpec;
5 15 2 rsaSpec Ljava/security/spec/RSAPrivateCrtKeySpec;
17 21 2 rsaSpec Ljava/security/spec/RSAPrivateKeySpec;
Exceptions:
throws java.security.GeneralSecurityException
MethodParameters:
Name Flags
keySpec
protected <T extends java.security.spec.KeySpec> T engineGetKeySpec(java.security.Key, java.lang.Class<T>);
descriptor: (Ljava/security/Key;Ljava/lang/Class;)Ljava/security/spec/KeySpec;
flags: (0x0004) ACC_PROTECTED
Code:
stack=11, locals=4, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 1
invokevirtual sun.security.rsa.RSAKeyFactory.engineTranslateKey:(Ljava/security/Key;)Ljava/security/Key;
astore 1
1: goto 4
StackMap locals:
StackMap stack: java.security.InvalidKeyException
2: astore 3
start local 3 3: new java.security.spec.InvalidKeySpecException
dup
aload 3
invokespecial java.security.spec.InvalidKeySpecException.<init>:(Ljava/lang/Throwable;)V
athrow
end local 3 4: StackMap locals:
StackMap stack:
aload 1
instanceof java.security.interfaces.RSAPublicKey
ifeq 16
5: aload 1
checkcast java.security.interfaces.RSAPublicKey
astore 3
start local 3 6: getstatic sun.security.rsa.RSAKeyFactory.rsaPublicKeySpecClass:Ljava/lang/Class;
aload 2
invokevirtual java.lang.Class.isAssignableFrom:(Ljava/lang/Class;)Z
ifeq 11
7: aload 2
new java.security.spec.RSAPublicKeySpec
dup
8: aload 3
invokeinterface java.security.interfaces.RSAPublicKey.getModulus:()Ljava/math/BigInteger;
9: aload 3
invokeinterface java.security.interfaces.RSAPublicKey.getPublicExponent:()Ljava/math/BigInteger;
invokespecial java.security.spec.RSAPublicKeySpec.<init>:(Ljava/math/BigInteger;Ljava/math/BigInteger;)V
10: invokevirtual java.lang.Class.cast:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.security.spec.KeySpec
areturn
11: StackMap locals: java.security.interfaces.RSAPublicKey
StackMap stack:
getstatic sun.security.rsa.RSAKeyFactory.x509KeySpecClass:Ljava/lang/Class;
aload 2
invokevirtual java.lang.Class.isAssignableFrom:(Ljava/lang/Class;)Z
ifeq 13
12: aload 2
new java.security.spec.X509EncodedKeySpec
dup
aload 1
invokeinterface java.security.Key.getEncoded:()[B
invokespecial java.security.spec.X509EncodedKeySpec.<init>:([B)V
invokevirtual java.lang.Class.cast:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.security.spec.KeySpec
areturn
13: StackMap locals:
StackMap stack:
new java.security.spec.InvalidKeySpecException
dup
14: ldc "KeySpec must be RSAPublicKeySpec or X509EncodedKeySpec for RSA public keys"
15: invokespecial java.security.spec.InvalidKeySpecException.<init>:(Ljava/lang/String;)V
athrow
end local 3 16: StackMap locals:
StackMap stack:
aload 1
instanceof java.security.interfaces.RSAPrivateKey
ifeq 44
17: getstatic sun.security.rsa.RSAKeyFactory.pkcs8KeySpecClass:Ljava/lang/Class;
aload 2
invokevirtual java.lang.Class.isAssignableFrom:(Ljava/lang/Class;)Z
ifeq 19
18: aload 2
new java.security.spec.PKCS8EncodedKeySpec
dup
aload 1
invokeinterface java.security.Key.getEncoded:()[B
invokespecial java.security.spec.PKCS8EncodedKeySpec.<init>:([B)V
invokevirtual java.lang.Class.cast:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.security.spec.KeySpec
areturn
19: StackMap locals:
StackMap stack:
getstatic sun.security.rsa.RSAKeyFactory.rsaPrivateCrtKeySpecClass:Ljava/lang/Class;
aload 2
invokevirtual java.lang.Class.isAssignableFrom:(Ljava/lang/Class;)Z
ifeq 35
20: aload 1
instanceof java.security.interfaces.RSAPrivateCrtKey
ifeq 32
21: aload 1
checkcast java.security.interfaces.RSAPrivateCrtKey
astore 3
start local 3 22: aload 2
new java.security.spec.RSAPrivateCrtKeySpec
dup
23: aload 3
invokeinterface java.security.interfaces.RSAPrivateCrtKey.getModulus:()Ljava/math/BigInteger;
24: aload 3
invokeinterface java.security.interfaces.RSAPrivateCrtKey.getPublicExponent:()Ljava/math/BigInteger;
25: aload 3
invokeinterface java.security.interfaces.RSAPrivateCrtKey.getPrivateExponent:()Ljava/math/BigInteger;
26: aload 3
invokeinterface java.security.interfaces.RSAPrivateCrtKey.getPrimeP:()Ljava/math/BigInteger;
27: aload 3
invokeinterface java.security.interfaces.RSAPrivateCrtKey.getPrimeQ:()Ljava/math/BigInteger;
28: aload 3
invokeinterface java.security.interfaces.RSAPrivateCrtKey.getPrimeExponentP:()Ljava/math/BigInteger;
29: aload 3
invokeinterface java.security.interfaces.RSAPrivateCrtKey.getPrimeExponentQ:()Ljava/math/BigInteger;
30: aload 3
invokeinterface java.security.interfaces.RSAPrivateCrtKey.getCrtCoefficient:()Ljava/math/BigInteger;
invokespecial java.security.spec.RSAPrivateCrtKeySpec.<init>:(Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;)V
31: invokevirtual java.lang.Class.cast:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.security.spec.KeySpec
areturn
end local 3 32: StackMap locals:
StackMap stack:
new java.security.spec.InvalidKeySpecException
dup
33: ldc "RSAPrivateCrtKeySpec can only be used with CRT keys"
34: invokespecial java.security.spec.InvalidKeySpecException.<init>:(Ljava/lang/String;)V
athrow
35: StackMap locals:
StackMap stack:
getstatic sun.security.rsa.RSAKeyFactory.rsaPrivateKeySpecClass:Ljava/lang/Class;
aload 2
invokevirtual java.lang.Class.isAssignableFrom:(Ljava/lang/Class;)Z
ifeq 41
36: aload 1
checkcast java.security.interfaces.RSAPrivateKey
astore 3
start local 3 37: aload 2
new java.security.spec.RSAPrivateKeySpec
dup
38: aload 3
invokeinterface java.security.interfaces.RSAPrivateKey.getModulus:()Ljava/math/BigInteger;
39: aload 3
invokeinterface java.security.interfaces.RSAPrivateKey.getPrivateExponent:()Ljava/math/BigInteger;
invokespecial java.security.spec.RSAPrivateKeySpec.<init>:(Ljava/math/BigInteger;Ljava/math/BigInteger;)V
40: invokevirtual java.lang.Class.cast:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.security.spec.KeySpec
areturn
end local 3 41: StackMap locals:
StackMap stack:
new java.security.spec.InvalidKeySpecException
dup
42: ldc "KeySpec must be RSAPrivate(Crt)KeySpec or PKCS8EncodedKeySpec for RSA private keys"
43: invokespecial java.security.spec.InvalidKeySpecException.<init>:(Ljava/lang/String;)V
athrow
44: StackMap locals:
StackMap stack:
new java.security.spec.InvalidKeySpecException
dup
ldc "Neither public nor private key"
invokespecial java.security.spec.InvalidKeySpecException.<init>:(Ljava/lang/String;)V
athrow
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 45 0 this Lsun/security/rsa/RSAKeyFactory;
0 45 1 key Ljava/security/Key;
0 45 2 keySpec Ljava/lang/Class<TT;>;
3 4 3 e Ljava/security/InvalidKeyException;
6 16 3 rsaKey Ljava/security/interfaces/RSAPublicKey;
22 32 3 crtKey Ljava/security/interfaces/RSAPrivateCrtKey;
37 41 3 rsaKey Ljava/security/interfaces/RSAPrivateKey;
Exception table:
from to target type
0 1 2 Class java.security.InvalidKeyException
Exceptions:
throws java.security.spec.InvalidKeySpecException
Signature: <T::Ljava/security/spec/KeySpec;>(Ljava/security/Key;Ljava/lang/Class<TT;>;)TT;
MethodParameters:
Name Flags
key
keySpec
}
SourceFile: "RSAKeyFactory.java"