final class com.sun.crypto.provider.KeyProtector
minor version: 0
major version: 59
flags: flags: (0x0030) ACC_FINAL, ACC_SUPER
this_class: com.sun.crypto.provider.KeyProtector
super_class: java.lang.Object
{
private static final java.lang.String PBE_WITH_MD5_AND_DES3_CBC_OID;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: "1.3.6.1.4.1.42.2.19.1"
private static final java.lang.String KEY_PROTECTOR_OID;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: "1.3.6.1.4.1.42.2.17.1.1"
private static final int MAX_ITERATION_COUNT;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 5000000
private static final int ITERATION_COUNT;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 200000
private static final int SALT_LEN;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 20
private static final int DIGEST_LEN;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 20
private char[] password;
descriptor: [C
flags: (0x0002) ACC_PRIVATE
void <init>(char[]);
descriptor: ([C)V
flags: (0x0000)
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 1
ifnonnull 3
2: new java.lang.IllegalArgumentException
dup
ldc "password can't be null"
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
3: StackMap locals: com.sun.crypto.provider.KeyProtector char[]
StackMap stack:
aload 0
aload 1
putfield com.sun.crypto.provider.KeyProtector.password:[C
4: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lcom/sun/crypto/provider/KeyProtector;
0 5 1 password [C
MethodParameters:
Name Flags
password
byte[] protect(java.security.PrivateKey);
descriptor: (Ljava/security/PrivateKey;)[B
flags: (0x0000)
Code:
stack=5, locals=11, args_size=2
start local 0 start local 1 0: bipush 8
newarray 8
astore 2
start local 2 1: invokestatic com.sun.crypto.provider.SunJCE.getRandom:()Ljava/security/SecureRandom;
aload 2
invokevirtual java.security.SecureRandom.nextBytes:([B)V
2: new javax.crypto.spec.PBEParameterSpec
dup
aload 2
ldc 200000
invokespecial javax.crypto.spec.PBEParameterSpec.<init>:([BI)V
astore 3
start local 3 3: new javax.crypto.spec.PBEKeySpec
dup
aload 0
getfield com.sun.crypto.provider.KeyProtector.password:[C
invokespecial javax.crypto.spec.PBEKeySpec.<init>:([C)V
astore 4
start local 4 4: aconst_null
astore 5
start local 5 5: new com.sun.crypto.provider.PBEKey
dup
aload 4
ldc "PBEWithMD5AndTripleDES"
iconst_0
invokespecial com.sun.crypto.provider.PBEKey.<init>:(Ljavax/crypto/spec/PBEKeySpec;Ljava/lang/String;Z)V
astore 5
6: new com.sun.crypto.provider.PBEWithMD5AndTripleDESCipher
dup
invokespecial com.sun.crypto.provider.PBEWithMD5AndTripleDESCipher.<init>:()V
astore 6
start local 6 7: aload 6
iconst_1
aload 5
aload 3
aconst_null
invokevirtual com.sun.crypto.provider.PBEWithMD5AndTripleDESCipher.engineInit:(ILjava/security/Key;Ljava/security/spec/AlgorithmParameterSpec;Ljava/security/SecureRandom;)V
8: goto 13
end local 6 StackMap locals: com.sun.crypto.provider.KeyProtector java.security.PrivateKey byte[] javax.crypto.spec.PBEParameterSpec javax.crypto.spec.PBEKeySpec javax.crypto.SecretKey
StackMap stack: java.lang.Throwable
9: astore 7
10: aload 4
invokevirtual javax.crypto.spec.PBEKeySpec.clearPassword:()V
11: aload 5
ifnull 12
aload 5
invokeinterface javax.crypto.SecretKey.destroy:()V
12: StackMap locals: com.sun.crypto.provider.KeyProtector java.security.PrivateKey byte[] javax.crypto.spec.PBEParameterSpec javax.crypto.spec.PBEKeySpec javax.crypto.SecretKey top java.lang.Throwable
StackMap stack:
aload 7
athrow
start local 6 13: StackMap locals: com.sun.crypto.provider.KeyProtector java.security.PrivateKey byte[] javax.crypto.spec.PBEParameterSpec javax.crypto.spec.PBEKeySpec javax.crypto.SecretKey com.sun.crypto.provider.PBEWithMD5AndTripleDESCipher
StackMap stack:
aload 4
invokevirtual javax.crypto.spec.PBEKeySpec.clearPassword:()V
14: aload 5
ifnull 15
aload 5
invokeinterface javax.crypto.SecretKey.destroy:()V
15: StackMap locals:
StackMap stack:
aload 1
invokeinterface java.security.PrivateKey.getEncoded:()[B
astore 7
start local 7 16: aload 6
aload 7
iconst_0
aload 7
arraylength
invokevirtual com.sun.crypto.provider.PBEWithMD5AndTripleDESCipher.engineDoFinal:([BII)[B
astore 8
start local 8 17: aload 7
iconst_0
invokestatic java.util.Arrays.fill:([BB)V
18: ldc "PBE"
invokestatic com.sun.crypto.provider.SunJCE.getInstance:()Lcom/sun/crypto/provider/SunJCE;
invokestatic java.security.AlgorithmParameters.getInstance:(Ljava/lang/String;Ljava/security/Provider;)Ljava/security/AlgorithmParameters;
19: astore 9
start local 9 20: aload 9
aload 3
invokevirtual java.security.AlgorithmParameters.init:(Ljava/security/spec/AlgorithmParameterSpec;)V
21: new sun.security.x509.AlgorithmId
dup
22: new sun.security.util.ObjectIdentifier
dup
ldc "1.3.6.1.4.1.42.2.19.1"
invokespecial sun.security.util.ObjectIdentifier.<init>:(Ljava/lang/String;)V
aload 9
23: invokespecial sun.security.x509.AlgorithmId.<init>:(Lsun/security/util/ObjectIdentifier;Ljava/security/AlgorithmParameters;)V
astore 10
start local 10 24: new com.sun.crypto.provider.EncryptedPrivateKeyInfo
dup
aload 10
aload 8
invokespecial com.sun.crypto.provider.EncryptedPrivateKeyInfo.<init>:(Lsun/security/x509/AlgorithmId;[B)V
invokevirtual com.sun.crypto.provider.EncryptedPrivateKeyInfo.getEncoded:()[B
areturn
end local 10 end local 9 end local 8 end local 7 end local 6 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 25 0 this Lcom/sun/crypto/provider/KeyProtector;
0 25 1 key Ljava/security/PrivateKey;
1 25 2 salt [B
3 25 3 pbeSpec Ljavax/crypto/spec/PBEParameterSpec;
4 25 4 pbeKeySpec Ljavax/crypto/spec/PBEKeySpec;
5 25 5 sKey Ljavax/crypto/SecretKey;
7 9 6 cipher Lcom/sun/crypto/provider/PBEWithMD5AndTripleDESCipher;
13 25 6 cipher Lcom/sun/crypto/provider/PBEWithMD5AndTripleDESCipher;
16 25 7 plain [B
17 25 8 encrKey [B
20 25 9 pbeParams Ljava/security/AlgorithmParameters;
24 25 10 encrAlg Lsun/security/x509/AlgorithmId;
Exception table:
from to target type
5 9 9 any
Exceptions:
throws java.lang.Exception
MethodParameters:
Name Flags
key
java.security.Key recover(com.sun.crypto.provider.EncryptedPrivateKeyInfo);
descriptor: (Lcom/sun/crypto/provider/EncryptedPrivateKeyInfo;)Ljava/security/Key;
flags: (0x0000)
Code:
stack=5, locals=12, args_size=2
start local 0 start local 1 0: aconst_null
astore 2
start local 2 1: aconst_null
astore 3
start local 3 2: aload 1
invokevirtual com.sun.crypto.provider.EncryptedPrivateKeyInfo.getAlgorithm:()Lsun/security/x509/AlgorithmId;
invokevirtual sun.security.x509.AlgorithmId.getOID:()Lsun/security/util/ObjectIdentifier;
invokevirtual sun.security.util.ObjectIdentifier.toString:()Ljava/lang/String;
astore 4
start local 4 3: aload 4
ldc "1.3.6.1.4.1.42.2.19.1"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 6
4: aload 4
ldc "1.3.6.1.4.1.42.2.17.1.1"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 6
5: new java.security.UnrecoverableKeyException
dup
ldc "Unsupported encryption algorithm"
invokespecial java.security.UnrecoverableKeyException.<init>:(Ljava/lang/String;)V
athrow
6: StackMap locals: byte[] javax.crypto.SecretKey java.lang.String
StackMap stack:
aload 4
ldc "1.3.6.1.4.1.42.2.17.1.1"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 9
7: aload 0
aload 1
invokevirtual com.sun.crypto.provider.EncryptedPrivateKeyInfo.getEncryptedData:()[B
invokevirtual com.sun.crypto.provider.KeyProtector.recover:([B)[B
astore 2
8: goto 26
9: StackMap locals:
StackMap stack:
aload 1
invokevirtual com.sun.crypto.provider.EncryptedPrivateKeyInfo.getAlgorithm:()Lsun/security/x509/AlgorithmId;
invokevirtual sun.security.x509.AlgorithmId.getEncodedParams:()[B
10: astore 5
start local 5 11: ldc "PBE"
invokestatic java.security.AlgorithmParameters.getInstance:(Ljava/lang/String;)Ljava/security/AlgorithmParameters;
12: astore 6
start local 6 13: aload 6
aload 5
invokevirtual java.security.AlgorithmParameters.init:([B)V
14: aload 6
ldc Ljavax/crypto/spec/PBEParameterSpec;
invokevirtual java.security.AlgorithmParameters.getParameterSpec:(Ljava/lang/Class;)Ljava/security/spec/AlgorithmParameterSpec;
checkcast javax.crypto.spec.PBEParameterSpec
15: astore 7
start local 7 16: aload 7
invokevirtual javax.crypto.spec.PBEParameterSpec.getIterationCount:()I
ldc 5000000
if_icmple 18
17: new java.io.IOException
dup
ldc "PBE iteration count too large"
invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
athrow
18: StackMap locals: byte[] java.security.AlgorithmParameters javax.crypto.spec.PBEParameterSpec
StackMap stack:
new javax.crypto.spec.PBEKeySpec
dup
aload 0
getfield com.sun.crypto.provider.KeyProtector.password:[C
invokespecial javax.crypto.spec.PBEKeySpec.<init>:([C)V
astore 8
start local 8 19: new com.sun.crypto.provider.PBEKey
dup
aload 8
ldc "PBEWithMD5AndTripleDES"
iconst_0
invokespecial com.sun.crypto.provider.PBEKey.<init>:(Ljavax/crypto/spec/PBEKeySpec;Ljava/lang/String;Z)V
astore 3
20: aload 8
invokevirtual javax.crypto.spec.PBEKeySpec.clearPassword:()V
21: new com.sun.crypto.provider.PBEWithMD5AndTripleDESCipher
dup
invokespecial com.sun.crypto.provider.PBEWithMD5AndTripleDESCipher.<init>:()V
astore 9
start local 9 22: aload 9
iconst_2
aload 3
aload 7
aconst_null
invokevirtual com.sun.crypto.provider.PBEWithMD5AndTripleDESCipher.engineInit:(ILjava/security/Key;Ljava/security/spec/AlgorithmParameterSpec;Ljava/security/SecureRandom;)V
23: aload 9
aload 1
invokevirtual com.sun.crypto.provider.EncryptedPrivateKeyInfo.getEncryptedData:()[B
iconst_0
24: aload 1
invokevirtual com.sun.crypto.provider.EncryptedPrivateKeyInfo.getEncryptedData:()[B
arraylength
25: invokevirtual com.sun.crypto.provider.PBEWithMD5AndTripleDESCipher.engineDoFinal:([BII)[B
astore 2
end local 9 end local 8 end local 7 end local 6 end local 5 26: StackMap locals:
StackMap stack:
new sun.security.x509.AlgorithmId
dup
27: new com.sun.crypto.provider.PrivateKeyInfo
dup
aload 2
invokespecial com.sun.crypto.provider.PrivateKeyInfo.<init>:([B)V
invokevirtual com.sun.crypto.provider.PrivateKeyInfo.getAlgorithm:()Lsun/security/x509/AlgorithmId;
invokevirtual sun.security.x509.AlgorithmId.getOID:()Lsun/security/util/ObjectIdentifier;
28: invokespecial sun.security.x509.AlgorithmId.<init>:(Lsun/security/util/ObjectIdentifier;)V
29: invokevirtual sun.security.x509.AlgorithmId.getName:()Ljava/lang/String;
30: astore 5
start local 5 31: aload 5
invokestatic java.security.KeyFactory.getInstance:(Ljava/lang/String;)Ljava/security/KeyFactory;
astore 6
start local 6 32: aload 6
new java.security.spec.PKCS8EncodedKeySpec
dup
aload 2
invokespecial java.security.spec.PKCS8EncodedKeySpec.<init>:([B)V
invokevirtual java.security.KeyFactory.generatePrivate:(Ljava/security/spec/KeySpec;)Ljava/security/PrivateKey;
astore 11
33: aload 2
ifnull 34
aload 2
iconst_0
invokestatic java.util.Arrays.fill:([BB)V
34: StackMap locals: com.sun.crypto.provider.KeyProtector com.sun.crypto.provider.EncryptedPrivateKeyInfo byte[] javax.crypto.SecretKey java.lang.String java.lang.String java.security.KeyFactory top top top top java.security.Key
StackMap stack:
aload 3
ifnull 38
35: aload 3
invokeinterface javax.crypto.SecretKey.destroy:()V
36: goto 38
StackMap locals:
StackMap stack: javax.security.auth.DestroyFailedException
37: pop
38: StackMap locals:
StackMap stack:
aload 11
areturn
end local 6 end local 5 end local 4 39: StackMap locals: com.sun.crypto.provider.KeyProtector com.sun.crypto.provider.EncryptedPrivateKeyInfo byte[] javax.crypto.SecretKey
StackMap stack: java.security.NoSuchAlgorithmException
astore 4
start local 4 40: aload 4
athrow
end local 4 41: StackMap locals:
StackMap stack: java.io.IOException
astore 4
start local 4 42: new java.security.UnrecoverableKeyException
dup
aload 4
invokevirtual java.io.IOException.getMessage:()Ljava/lang/String;
invokespecial java.security.UnrecoverableKeyException.<init>:(Ljava/lang/String;)V
athrow
end local 4 43: StackMap locals:
StackMap stack: java.security.GeneralSecurityException
astore 4
start local 4 44: new java.security.UnrecoverableKeyException
dup
aload 4
invokevirtual java.security.GeneralSecurityException.getMessage:()Ljava/lang/String;
invokespecial java.security.UnrecoverableKeyException.<init>:(Ljava/lang/String;)V
athrow
end local 4 45: StackMap locals:
StackMap stack: java.lang.Throwable
astore 10
46: aload 2
ifnull 47
aload 2
iconst_0
invokestatic java.util.Arrays.fill:([BB)V
47: StackMap locals: com.sun.crypto.provider.KeyProtector com.sun.crypto.provider.EncryptedPrivateKeyInfo byte[] javax.crypto.SecretKey top top top top top top java.lang.Throwable
StackMap stack:
aload 3
ifnull 51
48: aload 3
invokeinterface javax.crypto.SecretKey.destroy:()V
49: goto 51
StackMap locals:
StackMap stack: javax.security.auth.DestroyFailedException
50: pop
51: StackMap locals:
StackMap stack:
aload 10
athrow
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 52 0 this Lcom/sun/crypto/provider/KeyProtector;
0 52 1 encrInfo Lcom/sun/crypto/provider/EncryptedPrivateKeyInfo;
1 52 2 plain [B
2 52 3 sKey Ljavax/crypto/SecretKey;
3 39 4 encrAlg Ljava/lang/String;
11 26 5 encodedParams [B
13 26 6 pbeParams Ljava/security/AlgorithmParameters;
16 26 7 pbeSpec Ljavax/crypto/spec/PBEParameterSpec;
19 26 8 pbeKeySpec Ljavax/crypto/spec/PBEKeySpec;
22 26 9 cipher Lcom/sun/crypto/provider/PBEWithMD5AndTripleDESCipher;
31 39 5 oidName Ljava/lang/String;
32 39 6 kFac Ljava/security/KeyFactory;
40 41 4 ex Ljava/security/NoSuchAlgorithmException;
42 43 4 ioe Ljava/io/IOException;
44 45 4 gse Ljava/security/GeneralSecurityException;
Exception table:
from to target type
35 36 37 Class javax.security.auth.DestroyFailedException
2 33 39 Class java.security.NoSuchAlgorithmException
2 33 41 Class java.io.IOException
2 33 43 Class java.security.GeneralSecurityException
2 33 45 any
39 45 45 any
48 49 50 Class javax.security.auth.DestroyFailedException
Exceptions:
throws java.security.UnrecoverableKeyException, java.security.NoSuchAlgorithmException
MethodParameters:
Name Flags
encrInfo
private byte[] recover(byte[]);
descriptor: ([B)[B
flags: (0x0002) ACC_PRIVATE
Code:
stack=6, locals=14, args_size=2
start local 0 start local 1 0: ldc "SHA"
invokestatic java.security.MessageDigest.getInstance:(Ljava/lang/String;)Ljava/security/MessageDigest;
astore 8
start local 8 1: bipush 20
newarray 8
astore 9
start local 9 2: aload 1
iconst_0
aload 9
iconst_0
bipush 20
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
3: aload 1
arraylength
bipush 20
isub
bipush 20
isub
istore 7
start local 7 4: iload 7
bipush 20
idiv
istore 5
start local 5 5: iload 7
bipush 20
irem
ifeq 7
6: iinc 5 1
7: StackMap locals: com.sun.crypto.provider.KeyProtector byte[] top top top int top int java.security.MessageDigest byte[]
StackMap stack:
iload 7
newarray 8
astore 10
start local 10 8: aload 1
bipush 20
aload 10
iconst_0
iload 7
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
9: aload 10
arraylength
newarray 8
astore 11
start local 11 10: aload 0
getfield com.sun.crypto.provider.KeyProtector.password:[C
arraylength
iconst_2
imul
newarray 8
astore 12
start local 12 11: iconst_0
istore 2
start local 2 12: iconst_0
istore 3
start local 3 13: goto 17
14: StackMap locals: com.sun.crypto.provider.KeyProtector byte[] int int top int top int java.security.MessageDigest byte[] byte[] byte[] byte[]
StackMap stack:
aload 12
iload 3
iinc 3 1
aload 0
getfield com.sun.crypto.provider.KeyProtector.password:[C
iload 2
caload
bipush 8
ishr
i2b
bastore
15: aload 12
iload 3
iinc 3 1
aload 0
getfield com.sun.crypto.provider.KeyProtector.password:[C
iload 2
caload
i2b
bastore
16: iinc 2 1
StackMap locals:
StackMap stack:
17: iload 2
aload 0
getfield com.sun.crypto.provider.KeyProtector.password:[C
arraylength
if_icmplt 14
18: iconst_0
istore 2
iconst_0
istore 6
start local 6 19: aload 9
astore 4
start local 4 20: goto 34
21: StackMap locals: com.sun.crypto.provider.KeyProtector byte[] int int byte[] int int int java.security.MessageDigest byte[] byte[] byte[] byte[]
StackMap stack:
aload 8
aload 12
invokevirtual java.security.MessageDigest.update:([B)V
22: aload 8
aload 4
invokevirtual java.security.MessageDigest.update:([B)V
23: aload 8
invokevirtual java.security.MessageDigest.digest:()[B
astore 4
24: aload 8
invokevirtual java.security.MessageDigest.reset:()V
25: iload 2
iload 5
iconst_1
isub
if_icmpge 30
26: aload 4
iconst_0
aload 11
iload 6
27: aload 4
arraylength
28: invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
29: goto 33
30: StackMap locals:
StackMap stack:
aload 4
iconst_0
aload 11
iload 6
31: aload 11
arraylength
iload 6
isub
32: invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
33: StackMap locals:
StackMap stack:
iinc 2 1
iinc 6 20
34: StackMap locals:
StackMap stack:
iload 2
iload 5
35: if_icmplt 21
36: aload 10
arraylength
newarray 8
astore 13
start local 13 37: iconst_0
istore 2
goto 40
38: StackMap locals: byte[]
StackMap stack:
aload 13
iload 2
aload 10
iload 2
baload
aload 11
iload 2
baload
ixor
i2b
bastore
39: iinc 2 1
StackMap locals:
StackMap stack:
40: iload 2
aload 13
arraylength
if_icmplt 38
41: aload 8
aload 12
invokevirtual java.security.MessageDigest.update:([B)V
42: aload 12
iconst_0
invokestatic java.util.Arrays.fill:([BB)V
43: aconst_null
astore 12
44: aload 8
aload 13
invokevirtual java.security.MessageDigest.update:([B)V
45: aload 8
invokevirtual java.security.MessageDigest.digest:()[B
astore 4
46: aload 8
invokevirtual java.security.MessageDigest.reset:()V
47: iconst_0
istore 2
goto 51
48: StackMap locals:
StackMap stack:
aload 4
iload 2
baload
aload 1
bipush 20
iload 7
iadd
iload 2
iadd
baload
if_icmpeq 50
49: new java.security.UnrecoverableKeyException
dup
ldc "Cannot recover key"
invokespecial java.security.UnrecoverableKeyException.<init>:(Ljava/lang/String;)V
athrow
50: StackMap locals:
StackMap stack:
iinc 2 1
StackMap locals:
StackMap stack:
51: iload 2
aload 4
arraylength
if_icmplt 48
52: aload 13
areturn
end local 13 end local 12 end local 11 end local 10 end local 9 end local 8 end local 7 end local 6 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 53 0 this Lcom/sun/crypto/provider/KeyProtector;
0 53 1 protectedKey [B
12 53 2 i I
13 53 3 j I
20 53 4 digest [B
5 53 5 numRounds I
19 53 6 xorOffset I
4 53 7 encrKeyLen I
1 53 8 md Ljava/security/MessageDigest;
2 53 9 salt [B
8 53 10 encrKey [B
10 53 11 xorKey [B
11 53 12 passwdBytes [B
37 53 13 plainKey [B
Exceptions:
throws java.security.UnrecoverableKeyException, java.security.NoSuchAlgorithmException
MethodParameters:
Name Flags
protectedKey
javax.crypto.SealedObject seal(java.security.Key);
descriptor: (Ljava/security/Key;)Ljavax/crypto/SealedObject;
flags: (0x0000)
Code:
stack=5, locals=9, args_size=2
start local 0 start local 1 0: bipush 8
newarray 8
astore 2
start local 2 1: invokestatic com.sun.crypto.provider.SunJCE.getRandom:()Ljava/security/SecureRandom;
aload 2
invokevirtual java.security.SecureRandom.nextBytes:([B)V
2: new javax.crypto.spec.PBEParameterSpec
dup
aload 2
ldc 200000
invokespecial javax.crypto.spec.PBEParameterSpec.<init>:([BI)V
astore 3
start local 3 3: new javax.crypto.spec.PBEKeySpec
dup
aload 0
getfield com.sun.crypto.provider.KeyProtector.password:[C
invokespecial javax.crypto.spec.PBEKeySpec.<init>:([C)V
astore 4
start local 4 4: aconst_null
astore 5
start local 5 5: new com.sun.crypto.provider.PBEKey
dup
aload 4
ldc "PBEWithMD5AndTripleDES"
iconst_0
invokespecial com.sun.crypto.provider.PBEKey.<init>:(Ljavax/crypto/spec/PBEKeySpec;Ljava/lang/String;Z)V
astore 5
6: aload 4
invokevirtual javax.crypto.spec.PBEKeySpec.clearPassword:()V
7: new com.sun.crypto.provider.PBEWithMD5AndTripleDESCipher
dup
invokespecial com.sun.crypto.provider.PBEWithMD5AndTripleDESCipher.<init>:()V
astore 7
start local 7 8: new com.sun.crypto.provider.CipherForKeyProtector
dup
aload 7
invokestatic com.sun.crypto.provider.SunJCE.getInstance:()Lcom/sun/crypto/provider/SunJCE;
9: ldc "PBEWithMD5AndTripleDES"
10: invokespecial com.sun.crypto.provider.CipherForKeyProtector.<init>:(Ljavax/crypto/CipherSpi;Ljava/security/Provider;Ljava/lang/String;)V
astore 6
start local 6 11: aload 6
iconst_1
aload 5
aload 3
invokevirtual javax.crypto.Cipher.init:(ILjava/security/Key;Ljava/security/spec/AlgorithmParameterSpec;)V
end local 7 12: goto 16
end local 6 StackMap locals: com.sun.crypto.provider.KeyProtector java.security.Key byte[] javax.crypto.spec.PBEParameterSpec javax.crypto.spec.PBEKeySpec javax.crypto.SecretKey
StackMap stack: java.lang.Throwable
13: astore 8
14: aload 5
ifnull 15
aload 5
invokeinterface javax.crypto.SecretKey.destroy:()V
15: StackMap locals: com.sun.crypto.provider.KeyProtector java.security.Key byte[] javax.crypto.spec.PBEParameterSpec javax.crypto.spec.PBEKeySpec javax.crypto.SecretKey top top java.lang.Throwable
StackMap stack:
aload 8
athrow
start local 6 16: StackMap locals: com.sun.crypto.provider.KeyProtector java.security.Key byte[] javax.crypto.spec.PBEParameterSpec javax.crypto.spec.PBEKeySpec javax.crypto.SecretKey javax.crypto.Cipher
StackMap stack:
aload 5
ifnull 17
aload 5
invokeinterface javax.crypto.SecretKey.destroy:()V
17: StackMap locals:
StackMap stack:
new com.sun.crypto.provider.SealedObjectForKeyProtector
dup
aload 1
aload 6
invokespecial com.sun.crypto.provider.SealedObjectForKeyProtector.<init>:(Ljava/io/Serializable;Ljavax/crypto/Cipher;)V
areturn
end local 6 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 18 0 this Lcom/sun/crypto/provider/KeyProtector;
0 18 1 key Ljava/security/Key;
1 18 2 salt [B
3 18 3 pbeSpec Ljavax/crypto/spec/PBEParameterSpec;
4 18 4 pbeKeySpec Ljavax/crypto/spec/PBEKeySpec;
5 18 5 sKey Ljavax/crypto/SecretKey;
11 13 6 cipher Ljavax/crypto/Cipher;
16 18 6 cipher Ljavax/crypto/Cipher;
8 12 7 cipherSpi Lcom/sun/crypto/provider/PBEWithMD5AndTripleDESCipher;
Exception table:
from to target type
5 13 13 any
Exceptions:
throws java.lang.Exception
MethodParameters:
Name Flags
key
java.security.Key unseal(javax.crypto.SealedObject);
descriptor: (Ljavax/crypto/SealedObject;)Ljava/security/Key;
flags: (0x0000)
Code:
stack=5, locals=11, args_size=2
start local 0 start local 1 0: aconst_null
astore 2
start local 2 1: new javax.crypto.spec.PBEKeySpec
dup
aload 0
getfield com.sun.crypto.provider.KeyProtector.password:[C
invokespecial javax.crypto.spec.PBEKeySpec.<init>:([C)V
astore 3
start local 3 2: new com.sun.crypto.provider.PBEKey
dup
aload 3
3: ldc "PBEWithMD5AndTripleDES"
iconst_0
4: invokespecial com.sun.crypto.provider.PBEKey.<init>:(Ljavax/crypto/spec/PBEKeySpec;Ljava/lang/String;Z)V
astore 2
5: aload 3
invokevirtual javax.crypto.spec.PBEKeySpec.clearPassword:()V
6: aconst_null
astore 4
start local 4 7: aload 1
instanceof com.sun.crypto.provider.SealedObjectForKeyProtector
ifne 10
8: new com.sun.crypto.provider.SealedObjectForKeyProtector
dup
aload 1
invokespecial com.sun.crypto.provider.SealedObjectForKeyProtector.<init>:(Ljavax/crypto/SealedObject;)V
astore 4
9: goto 11
10: StackMap locals: javax.crypto.SecretKey javax.crypto.spec.PBEKeySpec com.sun.crypto.provider.SealedObjectForKeyProtector
StackMap stack:
aload 1
checkcast com.sun.crypto.provider.SealedObjectForKeyProtector
astore 4
11: StackMap locals:
StackMap stack:
aload 4
invokevirtual com.sun.crypto.provider.SealedObjectForKeyProtector.getParameters:()Ljava/security/AlgorithmParameters;
astore 5
start local 5 12: aload 5
ifnonnull 14
13: new java.security.UnrecoverableKeyException
dup
ldc "Cannot get algorithm parameters"
invokespecial java.security.UnrecoverableKeyException.<init>:(Ljava/lang/String;)V
athrow
14: StackMap locals: java.security.AlgorithmParameters
StackMap stack:
aload 5
ldc Ljavax/crypto/spec/PBEParameterSpec;
invokevirtual java.security.AlgorithmParameters.getParameterSpec:(Ljava/lang/Class;)Ljava/security/spec/AlgorithmParameterSpec;
checkcast javax.crypto.spec.PBEParameterSpec
astore 6
start local 6 15: goto 18
end local 6 StackMap locals:
StackMap stack: java.security.spec.InvalidParameterSpecException
16: pop
17: new java.io.IOException
dup
ldc "Invalid PBE algorithm parameters"
invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
athrow
start local 6 18: StackMap locals: javax.crypto.spec.PBEParameterSpec
StackMap stack:
aload 6
invokevirtual javax.crypto.spec.PBEParameterSpec.getIterationCount:()I
ldc 5000000
if_icmple 20
19: new java.io.IOException
dup
ldc "PBE iteration count too large"
invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
athrow
20: StackMap locals:
StackMap stack:
new com.sun.crypto.provider.PBEWithMD5AndTripleDESCipher
dup
invokespecial com.sun.crypto.provider.PBEWithMD5AndTripleDESCipher.<init>:()V
astore 7
start local 7 21: new com.sun.crypto.provider.CipherForKeyProtector
dup
aload 7
22: invokestatic com.sun.crypto.provider.SunJCE.getInstance:()Lcom/sun/crypto/provider/SunJCE;
23: ldc "PBEWithMD5AndTripleDES"
24: invokespecial com.sun.crypto.provider.CipherForKeyProtector.<init>:(Ljavax/crypto/CipherSpi;Ljava/security/Provider;Ljava/lang/String;)V
astore 8
start local 8 25: aload 8
iconst_2
aload 2
aload 5
invokevirtual javax.crypto.Cipher.init:(ILjava/security/Key;Ljava/security/AlgorithmParameters;)V
26: aload 4
aload 8
invokevirtual com.sun.crypto.provider.SealedObjectForKeyProtector.getKey:(Ljavax/crypto/Cipher;)Ljava/security/Key;
astore 10
27: aload 2
ifnull 31
28: aload 2
invokeinterface javax.crypto.SecretKey.destroy:()V
29: goto 31
StackMap locals: com.sun.crypto.provider.KeyProtector javax.crypto.SealedObject javax.crypto.SecretKey javax.crypto.spec.PBEKeySpec com.sun.crypto.provider.SealedObjectForKeyProtector java.security.AlgorithmParameters javax.crypto.spec.PBEParameterSpec com.sun.crypto.provider.PBEWithMD5AndTripleDESCipher javax.crypto.Cipher top java.security.Key
StackMap stack: javax.security.auth.DestroyFailedException
30: pop
31: StackMap locals:
StackMap stack:
aload 10
areturn
end local 8 end local 7 end local 6 end local 5 end local 4 end local 3 32: StackMap locals: com.sun.crypto.provider.KeyProtector javax.crypto.SealedObject javax.crypto.SecretKey
StackMap stack: java.security.NoSuchAlgorithmException
astore 3
start local 3 33: aload 3
athrow
end local 3 34: StackMap locals:
StackMap stack: java.io.IOException
astore 3
start local 3 35: new java.security.UnrecoverableKeyException
dup
aload 3
invokevirtual java.io.IOException.getMessage:()Ljava/lang/String;
invokespecial java.security.UnrecoverableKeyException.<init>:(Ljava/lang/String;)V
athrow
end local 3 36: StackMap locals:
StackMap stack: java.lang.ClassNotFoundException
astore 3
start local 3 37: new java.security.UnrecoverableKeyException
dup
aload 3
invokevirtual java.lang.ClassNotFoundException.getMessage:()Ljava/lang/String;
invokespecial java.security.UnrecoverableKeyException.<init>:(Ljava/lang/String;)V
athrow
end local 3 38: StackMap locals:
StackMap stack: java.security.GeneralSecurityException
astore 3
start local 3 39: new java.security.UnrecoverableKeyException
dup
aload 3
invokevirtual java.security.GeneralSecurityException.getMessage:()Ljava/lang/String;
invokespecial java.security.UnrecoverableKeyException.<init>:(Ljava/lang/String;)V
athrow
end local 3 40: StackMap locals:
StackMap stack: java.lang.Throwable
astore 9
41: aload 2
ifnull 45
42: aload 2
invokeinterface javax.crypto.SecretKey.destroy:()V
43: goto 45
StackMap locals: com.sun.crypto.provider.KeyProtector javax.crypto.SealedObject javax.crypto.SecretKey top top top top top top java.lang.Throwable
StackMap stack: javax.security.auth.DestroyFailedException
44: pop
45: StackMap locals:
StackMap stack:
aload 9
athrow
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 46 0 this Lcom/sun/crypto/provider/KeyProtector;
0 46 1 so Ljavax/crypto/SealedObject;
1 46 2 sKey Ljavax/crypto/SecretKey;
2 32 3 pbeKeySpec Ljavax/crypto/spec/PBEKeySpec;
7 32 4 soForKeyProtector Lcom/sun/crypto/provider/SealedObjectForKeyProtector;
12 32 5 params Ljava/security/AlgorithmParameters;
15 16 6 pbeSpec Ljavax/crypto/spec/PBEParameterSpec;
18 32 6 pbeSpec Ljavax/crypto/spec/PBEParameterSpec;
21 32 7 cipherSpi Lcom/sun/crypto/provider/PBEWithMD5AndTripleDESCipher;
25 32 8 cipher Ljavax/crypto/Cipher;
33 34 3 ex Ljava/security/NoSuchAlgorithmException;
35 36 3 ioe Ljava/io/IOException;
37 38 3 cnfe Ljava/lang/ClassNotFoundException;
39 40 3 gse Ljava/security/GeneralSecurityException;
Exception table:
from to target type
14 15 16 Class java.security.spec.InvalidParameterSpecException
28 29 30 Class javax.security.auth.DestroyFailedException
1 27 32 Class java.security.NoSuchAlgorithmException
1 27 34 Class java.io.IOException
1 27 36 Class java.lang.ClassNotFoundException
1 27 38 Class java.security.GeneralSecurityException
1 27 40 any
32 40 40 any
42 43 44 Class javax.security.auth.DestroyFailedException
Exceptions:
throws java.security.NoSuchAlgorithmException, java.security.UnrecoverableKeyException
MethodParameters:
Name Flags
so
}
SourceFile: "KeyProtector.java"