final class sun.security.provider.KeyProtector
minor version: 0
major version: 59
flags: flags: (0x0030) ACC_FINAL, ACC_SUPER
this_class: sun.security.provider.KeyProtector
super_class: java.lang.Object
{
private static final int SALT_LEN;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 20
private static final java.lang.String DIGEST_ALG;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: "SHA"
private static final int DIGEST_LEN;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 20
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 byte[] passwdBytes;
descriptor: [B
flags: (0x0002) ACC_PRIVATE
private java.security.MessageDigest md;
descriptor: Ljava/security/MessageDigest;
flags: (0x0002) ACC_PRIVATE
public void <init>(byte[]);
descriptor: ([B)V
flags: (0x0001) ACC_PUBLIC
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: sun.security.provider.KeyProtector byte[]
StackMap stack:
aload 0
ldc "SHA"
invokestatic java.security.MessageDigest.getInstance:(Ljava/lang/String;)Ljava/security/MessageDigest;
putfield sun.security.provider.KeyProtector.md:Ljava/security/MessageDigest;
4: aload 0
aload 1
putfield sun.security.provider.KeyProtector.passwdBytes:[B
5: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lsun/security/provider/KeyProtector;
0 6 1 passwordBytes [B
Exceptions:
throws java.security.NoSuchAlgorithmException
MethodParameters:
Name Flags
passwordBytes
protected void finalize();
descriptor: ()V
flags: (0x0004) ACC_PROTECTED
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield sun.security.provider.KeyProtector.passwdBytes:[B
ifnull 3
1: aload 0
getfield sun.security.provider.KeyProtector.passwdBytes:[B
iconst_0
invokestatic java.util.Arrays.fill:([BB)V
2: aload 0
aconst_null
putfield sun.security.provider.KeyProtector.passwdBytes:[B
3: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lsun/security/provider/KeyProtector;
public byte[] protect(java.security.Key);
descriptor: (Ljava/security/Key;)[B
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=15, args_size=2
start local 0 start local 1 0: iconst_0
istore 6
start local 6 1: aload 1
ifnonnull 3
2: new java.lang.IllegalArgumentException
dup
ldc "plaintext key can't be null"
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
3: StackMap locals: sun.security.provider.KeyProtector java.security.Key top top top top int
StackMap stack:
ldc "PKCS#8"
aload 1
invokeinterface java.security.Key.getFormat:()Ljava/lang/String;
invokevirtual java.lang.String.equalsIgnoreCase:(Ljava/lang/String;)Z
ifne 7
4: new java.security.KeyStoreException
dup
5: ldc "Cannot get key bytes, not PKCS#8 encoded"
6: invokespecial java.security.KeyStoreException.<init>:(Ljava/lang/String;)V
athrow
7: StackMap locals:
StackMap stack:
aload 1
invokeinterface java.security.Key.getEncoded:()[B
astore 7
start local 7 8: aload 7
ifnonnull 12
9: new java.security.KeyStoreException
dup
10: ldc "Cannot get key bytes, encoding not supported"
11: invokespecial java.security.KeyStoreException.<init>:(Ljava/lang/String;)V
athrow
12: StackMap locals: byte[]
StackMap stack:
aload 7
arraylength
bipush 20
idiv
istore 3
start local 3 13: aload 7
arraylength
bipush 20
irem
ifeq 15
14: iinc 3 1
15: StackMap locals: sun.security.provider.KeyProtector java.security.Key top int top top int byte[]
StackMap stack:
bipush 20
newarray 8
astore 8
start local 8 16: new java.security.SecureRandom
dup
invokespecial java.security.SecureRandom.<init>:()V
astore 9
start local 9 17: aload 9
aload 8
invokevirtual java.security.SecureRandom.nextBytes:([B)V
18: aload 7
arraylength
newarray 8
astore 10
start local 10 19: iconst_0
istore 2
start local 2 20: iconst_0
istore 5
start local 5 21: aload 8
astore 4
start local 4 22: goto 36
23: StackMap locals: sun.security.provider.KeyProtector java.security.Key int int byte[] int int byte[] byte[] java.security.SecureRandom byte[]
StackMap stack:
aload 0
getfield sun.security.provider.KeyProtector.md:Ljava/security/MessageDigest;
aload 0
getfield sun.security.provider.KeyProtector.passwdBytes:[B
invokevirtual java.security.MessageDigest.update:([B)V
24: aload 0
getfield sun.security.provider.KeyProtector.md:Ljava/security/MessageDigest;
aload 4
invokevirtual java.security.MessageDigest.update:([B)V
25: aload 0
getfield sun.security.provider.KeyProtector.md:Ljava/security/MessageDigest;
invokevirtual java.security.MessageDigest.digest:()[B
astore 4
26: aload 0
getfield sun.security.provider.KeyProtector.md:Ljava/security/MessageDigest;
invokevirtual java.security.MessageDigest.reset:()V
27: iload 2
iload 3
iconst_1
isub
if_icmpge 32
28: aload 4
iconst_0
aload 10
iload 5
29: aload 4
arraylength
30: invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
31: goto 35
32: StackMap locals:
StackMap stack:
aload 4
iconst_0
aload 10
iload 5
33: aload 10
arraylength
iload 5
isub
34: invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
35: StackMap locals:
StackMap stack:
iinc 2 1
iinc 5 20
36: StackMap locals:
StackMap stack:
iload 2
iload 3
37: if_icmplt 23
38: aload 7
arraylength
newarray 8
astore 11
start local 11 39: iconst_0
istore 2
goto 42
40: StackMap locals: byte[]
StackMap stack:
aload 11
iload 2
aload 7
iload 2
baload
aload 10
iload 2
baload
ixor
i2b
bastore
41: iinc 2 1
StackMap locals:
StackMap stack:
42: iload 2
aload 11
arraylength
if_icmplt 40
43: aload 8
arraylength
aload 11
arraylength
iadd
bipush 20
iadd
newarray 8
astore 12
start local 12 44: aload 8
iconst_0
aload 12
iload 6
aload 8
arraylength
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
45: iload 6
aload 8
arraylength
iadd
istore 6
46: aload 11
iconst_0
aload 12
iload 6
aload 11
arraylength
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
47: iload 6
aload 11
arraylength
iadd
istore 6
48: aload 0
getfield sun.security.provider.KeyProtector.md:Ljava/security/MessageDigest;
aload 0
getfield sun.security.provider.KeyProtector.passwdBytes:[B
invokevirtual java.security.MessageDigest.update:([B)V
49: aload 0
getfield sun.security.provider.KeyProtector.passwdBytes:[B
iconst_0
invokestatic java.util.Arrays.fill:([BB)V
50: aload 0
aconst_null
putfield sun.security.provider.KeyProtector.passwdBytes:[B
51: aload 0
getfield sun.security.provider.KeyProtector.md:Ljava/security/MessageDigest;
aload 7
invokevirtual java.security.MessageDigest.update:([B)V
52: aload 0
getfield sun.security.provider.KeyProtector.md:Ljava/security/MessageDigest;
invokevirtual java.security.MessageDigest.digest:()[B
astore 4
53: aload 0
getfield sun.security.provider.KeyProtector.md:Ljava/security/MessageDigest;
invokevirtual java.security.MessageDigest.reset:()V
54: aload 4
iconst_0
aload 12
iload 6
aload 4
arraylength
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
55: new sun.security.x509.AlgorithmId
dup
new sun.security.util.ObjectIdentifier
dup
ldc "1.3.6.1.4.1.42.2.17.1.1"
invokespecial sun.security.util.ObjectIdentifier.<init>:(Ljava/lang/String;)V
invokespecial sun.security.x509.AlgorithmId.<init>:(Lsun/security/util/ObjectIdentifier;)V
astore 13
start local 13 56: new sun.security.pkcs.EncryptedPrivateKeyInfo
dup
aload 13
aload 12
invokespecial sun.security.pkcs.EncryptedPrivateKeyInfo.<init>:(Lsun/security/x509/AlgorithmId;[B)V
invokevirtual sun.security.pkcs.EncryptedPrivateKeyInfo.getEncoded:()[B
57: areturn
end local 13 58: StackMap locals: sun.security.provider.KeyProtector java.security.Key int int byte[] int int byte[] byte[] java.security.SecureRandom byte[] byte[] byte[]
StackMap stack: java.io.IOException
astore 14
start local 14 59: new java.security.KeyStoreException
dup
aload 14
invokevirtual java.io.IOException.getMessage:()Ljava/lang/String;
invokespecial java.security.KeyStoreException.<init>:(Ljava/lang/String;)V
athrow
end local 14 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 60 0 this Lsun/security/provider/KeyProtector;
0 60 1 key Ljava/security/Key;
20 60 2 i I
13 60 3 numRounds I
22 60 4 digest [B
21 60 5 xorOffset I
1 60 6 encrKeyOffset I
8 60 7 plainKey [B
16 60 8 salt [B
17 60 9 random Ljava/security/SecureRandom;
19 60 10 xorKey [B
39 60 11 tmpKey [B
44 60 12 encrKey [B
56 58 13 encrAlg Lsun/security/x509/AlgorithmId;
59 60 14 ioe Ljava/io/IOException;
Exception table:
from to target type
55 57 58 Class java.io.IOException
Exceptions:
throws java.security.KeyStoreException
MethodParameters:
Name Flags
key
public java.security.Key recover(sun.security.pkcs.EncryptedPrivateKeyInfo);
descriptor: (Lsun/security/pkcs/EncryptedPrivateKeyInfo;)Ljava/security/Key;
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=14, args_size=2
start local 0 start local 1 0: aload 1
invokevirtual sun.security.pkcs.EncryptedPrivateKeyInfo.getAlgorithm:()Lsun/security/x509/AlgorithmId;
astore 7
start local 7 1: aload 7
invokevirtual sun.security.x509.AlgorithmId.getOID:()Lsun/security/util/ObjectIdentifier;
invokevirtual sun.security.util.ObjectIdentifier.toString:()Ljava/lang/String;
ldc "1.3.6.1.4.1.42.2.17.1.1"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 3
2: new java.security.UnrecoverableKeyException
dup
ldc "Unsupported key protection algorithm"
invokespecial java.security.UnrecoverableKeyException.<init>:(Ljava/lang/String;)V
athrow
3: StackMap locals: sun.security.provider.KeyProtector sun.security.pkcs.EncryptedPrivateKeyInfo top top top top top sun.security.x509.AlgorithmId
StackMap stack:
aload 1
invokevirtual sun.security.pkcs.EncryptedPrivateKeyInfo.getEncryptedData:()[B
astore 8
start local 8 4: bipush 20
newarray 8
astore 9
start local 9 5: aload 8
iconst_0
aload 9
iconst_0
bipush 20
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
6: aload 8
arraylength
bipush 20
isub
bipush 20
isub
istore 6
start local 6 7: iload 6
bipush 20
idiv
istore 4
start local 4 8: iload 6
bipush 20
irem
ifeq 9
iinc 4 1
9: StackMap locals: sun.security.provider.KeyProtector sun.security.pkcs.EncryptedPrivateKeyInfo top top int top int sun.security.x509.AlgorithmId byte[] byte[]
StackMap stack:
iload 6
newarray 8
astore 10
start local 10 10: aload 8
bipush 20
aload 10
iconst_0
iload 6
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
11: aload 10
arraylength
newarray 8
astore 11
start local 11 12: iconst_0
istore 2
start local 2 13: iconst_0
istore 5
start local 5 14: aload 9
astore 3
start local 3 15: goto 29
16: StackMap locals: sun.security.provider.KeyProtector sun.security.pkcs.EncryptedPrivateKeyInfo int byte[] int int int sun.security.x509.AlgorithmId byte[] byte[] byte[] byte[]
StackMap stack:
aload 0
getfield sun.security.provider.KeyProtector.md:Ljava/security/MessageDigest;
aload 0
getfield sun.security.provider.KeyProtector.passwdBytes:[B
invokevirtual java.security.MessageDigest.update:([B)V
17: aload 0
getfield sun.security.provider.KeyProtector.md:Ljava/security/MessageDigest;
aload 3
invokevirtual java.security.MessageDigest.update:([B)V
18: aload 0
getfield sun.security.provider.KeyProtector.md:Ljava/security/MessageDigest;
invokevirtual java.security.MessageDigest.digest:()[B
astore 3
19: aload 0
getfield sun.security.provider.KeyProtector.md:Ljava/security/MessageDigest;
invokevirtual java.security.MessageDigest.reset:()V
20: iload 2
iload 4
iconst_1
isub
if_icmpge 25
21: aload 3
iconst_0
aload 11
iload 5
22: aload 3
arraylength
23: invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
24: goto 28
25: StackMap locals:
StackMap stack:
aload 3
iconst_0
aload 11
iload 5
26: aload 11
arraylength
iload 5
isub
27: invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
28: StackMap locals:
StackMap stack:
iinc 2 1
iinc 5 20
29: StackMap locals:
StackMap stack:
iload 2
iload 4
30: if_icmplt 16
31: aload 10
arraylength
newarray 8
astore 12
start local 12 32: iconst_0
istore 2
goto 35
33: StackMap locals: byte[]
StackMap stack:
aload 12
iload 2
aload 10
iload 2
baload
aload 11
iload 2
baload
ixor
i2b
bastore
34: iinc 2 1
StackMap locals:
StackMap stack:
35: iload 2
aload 12
arraylength
if_icmplt 33
36: aload 0
getfield sun.security.provider.KeyProtector.md:Ljava/security/MessageDigest;
aload 0
getfield sun.security.provider.KeyProtector.passwdBytes:[B
invokevirtual java.security.MessageDigest.update:([B)V
37: aload 0
getfield sun.security.provider.KeyProtector.passwdBytes:[B
iconst_0
invokestatic java.util.Arrays.fill:([BB)V
38: aload 0
aconst_null
putfield sun.security.provider.KeyProtector.passwdBytes:[B
39: aload 0
getfield sun.security.provider.KeyProtector.md:Ljava/security/MessageDigest;
aload 12
invokevirtual java.security.MessageDigest.update:([B)V
40: aload 0
getfield sun.security.provider.KeyProtector.md:Ljava/security/MessageDigest;
invokevirtual java.security.MessageDigest.digest:()[B
astore 3
41: aload 0
getfield sun.security.provider.KeyProtector.md:Ljava/security/MessageDigest;
invokevirtual java.security.MessageDigest.reset:()V
42: iconst_0
istore 2
goto 46
43: StackMap locals:
StackMap stack:
aload 3
iload 2
baload
aload 8
bipush 20
iload 6
iadd
iload 2
iadd
baload
if_icmpeq 45
44: new java.security.UnrecoverableKeyException
dup
ldc "Cannot recover key"
invokespecial java.security.UnrecoverableKeyException.<init>:(Ljava/lang/String;)V
athrow
45: StackMap locals:
StackMap stack:
iinc 2 1
StackMap locals:
StackMap stack:
46: iload 2
aload 3
arraylength
if_icmplt 43
47: new sun.security.util.DerValue
dup
aload 12
invokespecial sun.security.util.DerValue.<init>:([B)V
invokestatic sun.security.pkcs.PKCS8Key.parseKey:(Lsun/security/util/DerValue;)Ljava/security/PrivateKey;
48: areturn
49: StackMap locals:
StackMap stack: java.io.IOException
astore 13
start local 13 50: new java.security.UnrecoverableKeyException
dup
aload 13
invokevirtual java.io.IOException.getMessage:()Ljava/lang/String;
invokespecial java.security.UnrecoverableKeyException.<init>:(Ljava/lang/String;)V
athrow
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 51 0 this Lsun/security/provider/KeyProtector;
0 51 1 encrInfo Lsun/security/pkcs/EncryptedPrivateKeyInfo;
13 51 2 i I
15 51 3 digest [B
8 51 4 numRounds I
14 51 5 xorOffset I
7 51 6 encrKeyLen I
1 51 7 encrAlg Lsun/security/x509/AlgorithmId;
4 51 8 protectedKey [B
5 51 9 salt [B
10 51 10 encrKey [B
12 51 11 xorKey [B
32 51 12 plainKey [B
50 51 13 ioe Ljava/io/IOException;
Exception table:
from to target type
47 48 49 Class java.io.IOException
Exceptions:
throws java.security.UnrecoverableKeyException
MethodParameters:
Name Flags
encrInfo
}
SourceFile: "KeyProtector.java"