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 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
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
56: getstatic sun.security.util.KnownOIDs.JAVASOFT_JDKKeyProtector:Lsun/security/util/KnownOIDs;
57: invokestatic sun.security.util.ObjectIdentifier.of:(Lsun/security/util/KnownOIDs;)Lsun/security/util/ObjectIdentifier;
invokespecial sun.security.x509.AlgorithmId.<init>:(Lsun/security/util/ObjectIdentifier;)V
astore 13
start local 13 58: 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
59: areturn
end local 13 60: 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 61: 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 62 0 this Lsun/security/provider/KeyProtector;
0 62 1 key Ljava/security/Key;
20 62 2 i I
13 62 3 numRounds I
22 62 4 digest [B
21 62 5 xorOffset I
1 62 6 encrKeyOffset I
8 62 7 plainKey [B
16 62 8 salt [B
17 62 9 random Ljava/security/SecureRandom;
19 62 10 xorKey [B
39 62 11 tmpKey [B
44 62 12 encrKey [B
58 60 13 encrAlg Lsun/security/x509/AlgorithmId;
61 62 14 ioe Ljava/io/IOException;
Exception table:
from to target type
55 59 60 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;
2: getstatic sun.security.util.KnownOIDs.JAVASOFT_JDKKeyProtector:Lsun/security/util/KnownOIDs;
invokevirtual sun.security.util.KnownOIDs.value:()Ljava/lang/String;
3: invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
4: ifne 6
5: new java.security.UnrecoverableKeyException
dup
ldc "Unsupported key protection algorithm"
invokespecial java.security.UnrecoverableKeyException.<init>:(Ljava/lang/String;)V
athrow
6: 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 7: bipush 20
newarray 8
astore 9
start local 9 8: aload 8
iconst_0
aload 9
iconst_0
bipush 20
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
9: aload 8
arraylength
bipush 20
isub
bipush 20
isub
istore 6
start local 6 10: iload 6
bipush 20
idiv
istore 4
start local 4 11: iload 6
bipush 20
irem
ifeq 12
iinc 4 1
12: 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 13: aload 8
bipush 20
aload 10
iconst_0
iload 6
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
14: aload 10
arraylength
newarray 8
astore 11
start local 11 15: iconst_0
istore 2
start local 2 16: iconst_0
istore 5
start local 5 17: aload 9
astore 3
start local 3 18: goto 32
19: 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
20: aload 0
getfield sun.security.provider.KeyProtector.md:Ljava/security/MessageDigest;
aload 3
invokevirtual java.security.MessageDigest.update:([B)V
21: aload 0
getfield sun.security.provider.KeyProtector.md:Ljava/security/MessageDigest;
invokevirtual java.security.MessageDigest.digest:()[B
astore 3
22: aload 0
getfield sun.security.provider.KeyProtector.md:Ljava/security/MessageDigest;
invokevirtual java.security.MessageDigest.reset:()V
23: iload 2
iload 4
iconst_1
isub
if_icmpge 28
24: aload 3
iconst_0
aload 11
iload 5
25: aload 3
arraylength
26: invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
27: goto 31
28: StackMap locals:
StackMap stack:
aload 3
iconst_0
aload 11
iload 5
29: aload 11
arraylength
iload 5
isub
30: invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
31: StackMap locals:
StackMap stack:
iinc 2 1
iinc 5 20
32: StackMap locals:
StackMap stack:
iload 2
iload 4
33: if_icmplt 19
34: aload 10
arraylength
newarray 8
astore 12
start local 12 35: iconst_0
istore 2
goto 38
36: StackMap locals: byte[]
StackMap stack:
aload 12
iload 2
aload 10
iload 2
baload
aload 11
iload 2
baload
ixor
i2b
bastore
37: iinc 2 1
StackMap locals:
StackMap stack:
38: iload 2
aload 12
arraylength
if_icmplt 36
39: 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
40: aload 0
getfield sun.security.provider.KeyProtector.passwdBytes:[B
iconst_0
invokestatic java.util.Arrays.fill:([BB)V
41: aload 0
aconst_null
putfield sun.security.provider.KeyProtector.passwdBytes:[B
42: aload 0
getfield sun.security.provider.KeyProtector.md:Ljava/security/MessageDigest;
aload 12
invokevirtual java.security.MessageDigest.update:([B)V
43: aload 0
getfield sun.security.provider.KeyProtector.md:Ljava/security/MessageDigest;
invokevirtual java.security.MessageDigest.digest:()[B
astore 3
44: aload 0
getfield sun.security.provider.KeyProtector.md:Ljava/security/MessageDigest;
invokevirtual java.security.MessageDigest.reset:()V
45: iconst_0
istore 2
goto 49
46: StackMap locals:
StackMap stack:
aload 3
iload 2
baload
aload 8
bipush 20
iload 6
iadd
iload 2
iadd
baload
if_icmpeq 48
47: new java.security.UnrecoverableKeyException
dup
ldc "Cannot recover key"
invokespecial java.security.UnrecoverableKeyException.<init>:(Ljava/lang/String;)V
athrow
48: StackMap locals:
StackMap stack:
iinc 2 1
StackMap locals:
StackMap stack:
49: iload 2
aload 3
arraylength
if_icmplt 46
50: 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;
51: areturn
52: StackMap locals:
StackMap stack: java.io.IOException
astore 13
start local 13 53: 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 54 0 this Lsun/security/provider/KeyProtector;
0 54 1 encrInfo Lsun/security/pkcs/EncryptedPrivateKeyInfo;
16 54 2 i I
18 54 3 digest [B
11 54 4 numRounds I
17 54 5 xorOffset I
10 54 6 encrKeyLen I
1 54 7 encrAlg Lsun/security/x509/AlgorithmId;
7 54 8 protectedKey [B
8 54 9 salt [B
13 54 10 encrKey [B
15 54 11 xorKey [B
35 54 12 plainKey [B
53 54 13 ioe Ljava/io/IOException;
Exception table:
from to target type
50 51 52 Class java.io.IOException
Exceptions:
throws java.security.UnrecoverableKeyException
MethodParameters:
Name Flags
encrInfo
}
SourceFile: "KeyProtector.java"