final class sun.security.pkcs11.P11SecretKeyFactory extends javax.crypto.SecretKeyFactorySpi
minor version: 0
major version: 59
flags: flags: (0x0030) ACC_FINAL, ACC_SUPER
this_class: sun.security.pkcs11.P11SecretKeyFactory
super_class: javax.crypto.SecretKeyFactorySpi
{
private final sun.security.pkcs11.Token token;
descriptor: Lsun/security/pkcs11/Token;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.lang.String algorithm;
descriptor: Ljava/lang/String;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private static final java.util.Map<java.lang.String, java.lang.Long> keyTypes;
descriptor: Ljava/util/Map;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
Signature: Ljava/util/Map<Ljava/lang/String;Ljava/lang/Long;>;
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=3, locals=0, args_size=0
0: new java.util.HashMap
dup
invokespecial java.util.HashMap.<init>:()V
putstatic sun.security.pkcs11.P11SecretKeyFactory.keyTypes:Ljava/util/Map;
1: ldc "RC4"
ldc 18
invokestatic sun.security.pkcs11.P11SecretKeyFactory.addKeyType:(Ljava/lang/String;J)V
2: ldc "ARCFOUR"
ldc 18
invokestatic sun.security.pkcs11.P11SecretKeyFactory.addKeyType:(Ljava/lang/String;J)V
3: ldc "DES"
ldc 19
invokestatic sun.security.pkcs11.P11SecretKeyFactory.addKeyType:(Ljava/lang/String;J)V
4: ldc "DESede"
ldc 21
invokestatic sun.security.pkcs11.P11SecretKeyFactory.addKeyType:(Ljava/lang/String;J)V
5: ldc "AES"
ldc 31
invokestatic sun.security.pkcs11.P11SecretKeyFactory.addKeyType:(Ljava/lang/String;J)V
6: ldc "Blowfish"
ldc 32
invokestatic sun.security.pkcs11.P11SecretKeyFactory.addKeyType:(Ljava/lang/String;J)V
7: ldc "RC2"
ldc 17
invokestatic sun.security.pkcs11.P11SecretKeyFactory.addKeyType:(Ljava/lang/String;J)V
8: ldc "IDEA"
ldc 26
invokestatic sun.security.pkcs11.P11SecretKeyFactory.addKeyType:(Ljava/lang/String;J)V
9: ldc "TlsPremasterSecret"
ldc 2147483429
invokestatic sun.security.pkcs11.P11SecretKeyFactory.addKeyType:(Ljava/lang/String;J)V
10: ldc "TlsRsaPremasterSecret"
ldc 2147483430
invokestatic sun.security.pkcs11.P11SecretKeyFactory.addKeyType:(Ljava/lang/String;J)V
11: ldc "TlsMasterSecret"
ldc 2147483431
invokestatic sun.security.pkcs11.P11SecretKeyFactory.addKeyType:(Ljava/lang/String;J)V
12: ldc "Generic"
ldc 16
invokestatic sun.security.pkcs11.P11SecretKeyFactory.addKeyType:(Ljava/lang/String;J)V
13: return
LocalVariableTable:
Start End Slot Name Signature
void <init>(sun.security.pkcs11.Token, java.lang.String);
descriptor: (Lsun/security/pkcs11/Token;Ljava/lang/String;)V
flags: (0x0000)
Code:
stack=2, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokespecial javax.crypto.SecretKeyFactorySpi.<init>:()V
1: aload 0
aload 1
putfield sun.security.pkcs11.P11SecretKeyFactory.token:Lsun/security/pkcs11/Token;
2: aload 0
aload 2
putfield sun.security.pkcs11.P11SecretKeyFactory.algorithm:Ljava/lang/String;
3: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lsun/security/pkcs11/P11SecretKeyFactory;
0 4 1 token Lsun/security/pkcs11/Token;
0 4 2 algorithm Ljava/lang/String;
MethodParameters:
Name Flags
token
algorithm
private static void addKeyType(java.lang.String, long);
descriptor: (Ljava/lang/String;J)V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=3, locals=4, args_size=2
start local 0 start local 1 0: lload 1
invokestatic java.lang.Long.valueOf:(J)Ljava/lang/Long;
astore 3
start local 3 1: getstatic sun.security.pkcs11.P11SecretKeyFactory.keyTypes:Ljava/util/Map;
aload 0
aload 3
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
2: getstatic sun.security.pkcs11.P11SecretKeyFactory.keyTypes:Ljava/util/Map;
aload 0
getstatic java.util.Locale.ENGLISH:Ljava/util/Locale;
invokevirtual java.lang.String.toUpperCase:(Ljava/util/Locale;)Ljava/lang/String;
aload 3
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
3: return
end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 name Ljava/lang/String;
0 4 1 id J
1 4 3 l Ljava/lang/Long;
MethodParameters:
Name Flags
name
id
static long getKeyType(java.lang.String);
descriptor: (Ljava/lang/String;)J
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=2, args_size=1
start local 0 0: getstatic sun.security.pkcs11.P11SecretKeyFactory.keyTypes:Ljava/util/Map;
aload 0
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.lang.Long
astore 1
start local 1 1: aload 1
ifnonnull 9
2: aload 0
getstatic java.util.Locale.ENGLISH:Ljava/util/Locale;
invokevirtual java.lang.String.toUpperCase:(Ljava/util/Locale;)Ljava/lang/String;
astore 0
3: getstatic sun.security.pkcs11.P11SecretKeyFactory.keyTypes:Ljava/util/Map;
aload 0
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.lang.Long
astore 1
4: aload 1
ifnonnull 9
5: aload 0
ldc "HMAC"
invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
ifeq 7
6: ldc 2147483427
lreturn
7: StackMap locals: java.lang.Long
StackMap stack:
aload 0
ldc "SSLMAC"
invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
ifeq 9
8: ldc 2147483428
lreturn
9: StackMap locals:
StackMap stack:
aload 1
ifnull 10
aload 1
invokevirtual java.lang.Long.longValue:()J
goto 11
StackMap locals:
StackMap stack:
10: ldc -1
StackMap locals:
StackMap stack: long
11: lreturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 algorithm Ljava/lang/String;
1 12 1 l Ljava/lang/Long;
MethodParameters:
Name Flags
algorithm
static sun.security.pkcs11.P11Key convertKey(sun.security.pkcs11.Token, java.security.Key, java.lang.String);
descriptor: (Lsun/security/pkcs11/Token;Ljava/security/Key;Ljava/lang/String;)Lsun/security/pkcs11/P11Key;
flags: (0x0008) ACC_STATIC
Code:
stack=5, locals=7, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokevirtual sun.security.pkcs11.Token.ensureValid:()V
1: aload 1
ifnonnull 3
2: new java.security.InvalidKeyException
dup
ldc "Key must not be null"
invokespecial java.security.InvalidKeyException.<init>:(Ljava/lang/String;)V
athrow
3: StackMap locals:
StackMap stack:
aload 1
instanceof javax.crypto.SecretKey
ifne 5
4: new java.security.InvalidKeyException
dup
ldc "Key must be a SecretKey"
invokespecial java.security.InvalidKeyException.<init>:(Ljava/lang/String;)V
athrow
5: StackMap locals:
StackMap stack:
aload 2
ifnonnull 9
6: aload 1
invokeinterface java.security.Key.getAlgorithm:()Ljava/lang/String;
astore 2
7: aload 2
invokestatic sun.security.pkcs11.P11SecretKeyFactory.getKeyType:(Ljava/lang/String;)J
lstore 3
start local 3 8: goto 16
end local 3 9: StackMap locals:
StackMap stack:
aload 2
invokestatic sun.security.pkcs11.P11SecretKeyFactory.getKeyType:(Ljava/lang/String;)J
lstore 3
start local 3 10: aload 1
invokeinterface java.security.Key.getAlgorithm:()Ljava/lang/String;
invokestatic sun.security.pkcs11.P11SecretKeyFactory.getKeyType:(Ljava/lang/String;)J
lstore 5
start local 5 11: lload 3
lload 5
lcmp
ifeq 16
12: lload 3
ldc 2147483427
lcmp
ifeq 16
lload 3
ldc 2147483428
lcmp
ifeq 16
13: new java.security.InvalidKeyException
dup
14: new java.lang.StringBuilder
dup
ldc "Key algorithm must be "
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;
15: invokespecial java.security.InvalidKeyException.<init>:(Ljava/lang/String;)V
athrow
end local 5 16: StackMap locals: long
StackMap stack:
aload 1
instanceof sun.security.pkcs11.P11Key
ifeq 20
17: aload 1
checkcast sun.security.pkcs11.P11Key
astore 5
start local 5 18: aload 5
getfield sun.security.pkcs11.P11Key.token:Lsun/security/pkcs11/Token;
aload 0
if_acmpne 20
19: aload 5
areturn
end local 5 20: StackMap locals:
StackMap stack:
aload 0
getfield sun.security.pkcs11.Token.secretCache:Lsun/security/pkcs11/KeyCache;
aload 1
invokevirtual sun.security.pkcs11.KeyCache.get:(Ljava/security/Key;)Lsun/security/pkcs11/P11Key;
astore 5
start local 5 21: aload 5
ifnull 23
22: aload 5
areturn
23: StackMap locals: sun.security.pkcs11.P11Key
StackMap stack:
ldc "RAW"
aload 1
invokeinterface java.security.Key.getFormat:()Ljava/lang/String;
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 25
24: new java.security.InvalidKeyException
dup
ldc "Encoded format must be RAW"
invokespecial java.security.InvalidKeyException.<init>:(Ljava/lang/String;)V
athrow
25: StackMap locals:
StackMap stack:
aload 1
invokeinterface java.security.Key.getEncoded:()[B
astore 6
start local 6 26: aload 0
aload 6
aload 2
lload 3
invokestatic sun.security.pkcs11.P11SecretKeyFactory.createKey:(Lsun/security/pkcs11/Token;[BLjava/lang/String;J)Lsun/security/pkcs11/P11Key;
astore 5
27: aload 0
getfield sun.security.pkcs11.Token.secretCache:Lsun/security/pkcs11/KeyCache;
aload 1
aload 5
invokevirtual sun.security.pkcs11.KeyCache.put:(Ljava/security/Key;Lsun/security/pkcs11/P11Key;)V
28: aload 5
areturn
end local 6 end local 5 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 29 0 token Lsun/security/pkcs11/Token;
0 29 1 key Ljava/security/Key;
0 29 2 algorithm Ljava/lang/String;
8 9 3 algorithmType J
10 29 3 algorithmType J
11 16 5 keyAlgorithmType J
18 20 5 p11Key Lsun/security/pkcs11/P11Key;
21 29 5 p11Key Lsun/security/pkcs11/P11Key;
26 29 6 encoded [B
Exceptions:
throws java.security.InvalidKeyException
MethodParameters:
Name Flags
token
key
algorithm
static void fixDESParity(byte[], int);
descriptor: ([BI)V
flags: (0x0008) ACC_STATIC
Code:
stack=3, locals=4, args_size=2
start local 0 start local 1 0: iconst_0
istore 2
start local 2 1: goto 6
2: StackMap locals: int
StackMap stack:
aload 0
iload 1
baload
sipush 254
iand
istore 3
start local 3 3: iload 3
iload 3
invokestatic java.lang.Integer.bitCount:(I)I
iconst_1
iand
iconst_1
ixor
ior
istore 3
4: aload 0
iload 1
iinc 1 1
iload 3
i2b
bastore
end local 3 5: iinc 2 1
StackMap locals:
StackMap stack:
6: iload 2
bipush 8
if_icmplt 2
end local 2 7: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 key [B
0 8 1 offset I
1 7 2 i I
3 5 3 b I
MethodParameters:
Name Flags
key
offset
private static sun.security.pkcs11.P11Key createKey(sun.security.pkcs11.Token, byte[], java.lang.String, long);
descriptor: (Lsun/security/pkcs11/Token;[BLjava/lang/String;J)Lsun/security/pkcs11/P11Key;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=9, locals=14, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 1
arraylength
istore 5
start local 5 1: lload 3
l2i
lookupswitch { // 11
16: 41
18: 2
19: 8
21: 15
31: 29
32: 35
2147483427: 44
2147483428: 44
2147483429: 41
2147483430: 41
2147483431: 41
default: 51
}
2: StackMap locals: int
StackMap stack:
iload 5
iconst_5
if_icmplt 3
iload 5
sipush 128
if_icmple 6
3: StackMap locals:
StackMap stack:
new java.security.InvalidKeyException
dup
4: ldc "ARCFOUR key length must be between 5 and 128 bytes"
5: invokespecial java.security.InvalidKeyException.<init>:(Ljava/lang/String;)V
athrow
6: StackMap locals:
StackMap stack:
iload 5
iconst_3
ishl
istore 6
start local 6 7: goto 52
end local 6 8: StackMap locals:
StackMap stack:
iload 5
bipush 8
if_icmpeq 12
9: new java.security.InvalidKeyException
dup
10: ldc "DES key length must be 8 bytes"
11: invokespecial java.security.InvalidKeyException.<init>:(Ljava/lang/String;)V
athrow
12: StackMap locals:
StackMap stack:
bipush 56
istore 6
start local 6 13: aload 1
iconst_0
invokestatic sun.security.pkcs11.P11SecretKeyFactory.fixDESParity:([BI)V
14: goto 52
end local 6 15: StackMap locals:
StackMap stack:
iload 5
bipush 16
if_icmpne 18
16: ldc 20
lstore 3
17: goto 25
StackMap locals:
StackMap stack:
18: iload 5
bipush 24
if_icmpne 22
19: ldc 21
lstore 3
20: aload 1
bipush 16
invokestatic sun.security.pkcs11.P11SecretKeyFactory.fixDESParity:([BI)V
21: goto 25
22: StackMap locals:
StackMap stack:
new java.security.InvalidKeyException
dup
23: ldc "DESede key length must be 16 or 24 bytes"
24: invokespecial java.security.InvalidKeyException.<init>:(Ljava/lang/String;)V
athrow
25: StackMap locals:
StackMap stack:
aload 1
iconst_0
invokestatic sun.security.pkcs11.P11SecretKeyFactory.fixDESParity:([BI)V
26: aload 1
bipush 8
invokestatic sun.security.pkcs11.P11SecretKeyFactory.fixDESParity:([BI)V
27: iload 5
bipush 7
imul
istore 6
start local 6 28: goto 52
end local 6 29: StackMap locals:
StackMap stack:
iload 5
bipush 16
if_icmpeq 33
iload 5
bipush 24
if_icmpeq 33
iload 5
bipush 32
if_icmpeq 33
30: new java.security.InvalidKeyException
dup
31: ldc "AES key length must be 16, 24, or 32 bytes"
32: invokespecial java.security.InvalidKeyException.<init>:(Ljava/lang/String;)V
athrow
33: StackMap locals:
StackMap stack:
iload 5
iconst_3
ishl
istore 6
start local 6 34: goto 52
end local 6 35: StackMap locals:
StackMap stack:
iload 5
iconst_5
if_icmplt 36
iload 5
bipush 56
if_icmple 39
36: StackMap locals:
StackMap stack:
new java.security.InvalidKeyException
dup
37: ldc "Blowfish key length must be between 5 and 56 bytes"
38: invokespecial java.security.InvalidKeyException.<init>:(Ljava/lang/String;)V
athrow
39: StackMap locals:
StackMap stack:
iload 5
iconst_3
ishl
istore 6
start local 6 40: goto 52
end local 6 41: StackMap locals:
StackMap stack:
ldc 16
lstore 3
42: iload 5
iconst_3
ishl
istore 6
start local 6 43: goto 52
end local 6 44: StackMap locals:
StackMap stack:
iload 5
ifne 48
45: new java.security.InvalidKeyException
dup
46: ldc "MAC keys must not be empty"
47: invokespecial java.security.InvalidKeyException.<init>:(Ljava/lang/String;)V
athrow
48: StackMap locals:
StackMap stack:
ldc 16
lstore 3
49: iload 5
iconst_3
ishl
istore 6
start local 6 50: goto 52
end local 6 51: StackMap locals:
StackMap stack:
new java.security.InvalidKeyException
dup
new java.lang.StringBuilder
dup
ldc "Unknown algorithm "
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
start local 6 52: StackMap locals: int
StackMap stack:
aconst_null
astore 7
start local 7 53: iconst_3
anewarray sun.security.pkcs11.wrapper.CK_ATTRIBUTE
dup
iconst_0
54: new sun.security.pkcs11.wrapper.CK_ATTRIBUTE
dup
lconst_0
ldc 4
invokespecial sun.security.pkcs11.wrapper.CK_ATTRIBUTE.<init>:(JJ)V
aastore
dup
iconst_1
55: new sun.security.pkcs11.wrapper.CK_ATTRIBUTE
dup
ldc 256
lload 3
invokespecial sun.security.pkcs11.wrapper.CK_ATTRIBUTE.<init>:(JJ)V
aastore
dup
iconst_2
56: new sun.security.pkcs11.wrapper.CK_ATTRIBUTE
dup
ldc 17
aload 1
invokespecial sun.security.pkcs11.wrapper.CK_ATTRIBUTE.<init>:(JLjava/lang/Object;)V
aastore
57: astore 8
start local 8 58: aload 0
59: ldc "import"
ldc 4
lload 3
aload 8
60: invokevirtual sun.security.pkcs11.Token.getAttributes:(Ljava/lang/String;JJ[Lsun/security/pkcs11/wrapper/CK_ATTRIBUTE;)[Lsun/security/pkcs11/wrapper/CK_ATTRIBUTE;
astore 8
61: aload 0
invokevirtual sun.security.pkcs11.Token.getObjSession:()Lsun/security/pkcs11/Session;
astore 7
62: aload 0
getfield sun.security.pkcs11.Token.p11:Lsun/security/pkcs11/wrapper/PKCS11;
aload 7
invokevirtual sun.security.pkcs11.Session.id:()J
aload 8
invokevirtual sun.security.pkcs11.wrapper.PKCS11.C_CreateObject:(J[Lsun/security/pkcs11/wrapper/CK_ATTRIBUTE;)J
lstore 9
start local 9 63: aload 7
lload 9
aload 2
iload 6
aload 8
64: invokestatic sun.security.pkcs11.P11Key.secretKey:(Lsun/security/pkcs11/Session;JLjava/lang/String;I[Lsun/security/pkcs11/wrapper/CK_ATTRIBUTE;)Ljavax/crypto/SecretKey;
checkcast sun.security.pkcs11.P11Key
astore 11
start local 11 65: aload 11
astore 13
66: aload 0
aload 7
invokevirtual sun.security.pkcs11.Token.releaseSession:(Lsun/security/pkcs11/Session;)Lsun/security/pkcs11/Session;
pop
67: aload 13
areturn
end local 11 end local 9 end local 8 68: StackMap locals: sun.security.pkcs11.Token byte[] java.lang.String long int int sun.security.pkcs11.Session
StackMap stack: sun.security.pkcs11.wrapper.PKCS11Exception
astore 8
start local 8 69: new java.security.InvalidKeyException
dup
ldc "Could not create key"
aload 8
invokespecial java.security.InvalidKeyException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 8 70: StackMap locals:
StackMap stack: java.lang.Throwable
astore 12
71: aload 0
aload 7
invokevirtual sun.security.pkcs11.Token.releaseSession:(Lsun/security/pkcs11/Session;)Lsun/security/pkcs11/Session;
pop
72: aload 12
athrow
end local 7 end local 6 end local 5 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 73 0 token Lsun/security/pkcs11/Token;
0 73 1 encoded [B
0 73 2 algorithm Ljava/lang/String;
0 73 3 keyType J
1 73 5 n I
7 8 6 keyLength I
13 15 6 keyLength I
28 29 6 keyLength I
34 35 6 keyLength I
40 41 6 keyLength I
43 44 6 keyLength I
50 51 6 keyLength I
52 73 6 keyLength I
53 73 7 session Lsun/security/pkcs11/Session;
58 68 8 attributes [Lsun/security/pkcs11/wrapper/CK_ATTRIBUTE;
63 68 9 keyID J
65 68 11 p11Key Lsun/security/pkcs11/P11Key;
69 70 8 e Lsun/security/pkcs11/wrapper/PKCS11Exception;
Exception table:
from to target type
53 66 68 Class sun.security.pkcs11.wrapper.PKCS11Exception
53 66 70 any
68 70 70 any
Exceptions:
throws java.security.InvalidKeyException
MethodParameters:
Name Flags
token
encoded
algorithm
keyType
protected javax.crypto.SecretKey engineGenerateSecret(java.security.spec.KeySpec);
descriptor: (Ljava/security/spec/KeySpec;)Ljavax/crypto/SecretKey;
flags: (0x0004) ACC_PROTECTED
Code:
stack=5, locals=3, args_size=2
start local 0 start local 1 0: aload 0
getfield sun.security.pkcs11.P11SecretKeyFactory.token:Lsun/security/pkcs11/Token;
invokevirtual sun.security.pkcs11.Token.ensureValid:()V
1: aload 1
ifnonnull 3
2: new java.security.spec.InvalidKeySpecException
dup
ldc "KeySpec must not be null"
invokespecial java.security.spec.InvalidKeySpecException.<init>:(Ljava/lang/String;)V
athrow
3: StackMap locals:
StackMap stack:
aload 1
instanceof javax.crypto.spec.SecretKeySpec
ifeq 9
4: aload 0
getfield sun.security.pkcs11.P11SecretKeyFactory.token:Lsun/security/pkcs11/Token;
aload 1
checkcast javax.crypto.SecretKey
aload 0
getfield sun.security.pkcs11.P11SecretKeyFactory.algorithm:Ljava/lang/String;
invokestatic sun.security.pkcs11.P11SecretKeyFactory.convertKey:(Lsun/security/pkcs11/Token;Ljava/security/Key;Ljava/lang/String;)Lsun/security/pkcs11/P11Key;
astore 2
start local 2 5: aload 2
checkcast javax.crypto.SecretKey
6: areturn
end local 2 7: StackMap locals:
StackMap stack: java.security.InvalidKeyException
astore 2
start local 2 8: new java.security.spec.InvalidKeySpecException
dup
aload 2
invokespecial java.security.spec.InvalidKeySpecException.<init>:(Ljava/lang/Throwable;)V
athrow
end local 2 9: StackMap locals:
StackMap stack:
aload 0
getfield sun.security.pkcs11.P11SecretKeyFactory.algorithm:Ljava/lang/String;
ldc "DES"
invokevirtual java.lang.String.equalsIgnoreCase:(Ljava/lang/String;)Z
ifeq 14
10: aload 1
instanceof javax.crypto.spec.DESKeySpec
ifeq 19
11: aload 1
checkcast javax.crypto.spec.DESKeySpec
invokevirtual javax.crypto.spec.DESKeySpec.getKey:()[B
astore 2
start local 2 12: new javax.crypto.spec.SecretKeySpec
dup
aload 2
ldc "DES"
invokespecial javax.crypto.spec.SecretKeySpec.<init>:([BLjava/lang/String;)V
astore 1
13: aload 0
aload 1
invokevirtual sun.security.pkcs11.P11SecretKeyFactory.engineGenerateSecret:(Ljava/security/spec/KeySpec;)Ljavax/crypto/SecretKey;
areturn
end local 2 14: StackMap locals:
StackMap stack:
aload 0
getfield sun.security.pkcs11.P11SecretKeyFactory.algorithm:Ljava/lang/String;
ldc "DESede"
invokevirtual java.lang.String.equalsIgnoreCase:(Ljava/lang/String;)Z
ifeq 19
15: aload 1
instanceof javax.crypto.spec.DESedeKeySpec
ifeq 19
16: aload 1
checkcast javax.crypto.spec.DESedeKeySpec
invokevirtual javax.crypto.spec.DESedeKeySpec.getKey:()[B
astore 2
start local 2 17: new javax.crypto.spec.SecretKeySpec
dup
aload 2
ldc "DESede"
invokespecial javax.crypto.spec.SecretKeySpec.<init>:([BLjava/lang/String;)V
astore 1
18: aload 0
aload 1
invokevirtual sun.security.pkcs11.P11SecretKeyFactory.engineGenerateSecret:(Ljava/security/spec/KeySpec;)Ljavax/crypto/SecretKey;
areturn
end local 2 19: StackMap locals:
StackMap stack:
new java.security.spec.InvalidKeySpecException
dup
20: new java.lang.StringBuilder
dup
ldc "Unsupported spec: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual java.lang.Object.getClass:()Ljava/lang/Class;
invokevirtual java.lang.Class.getName:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
21: 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/pkcs11/P11SecretKeyFactory;
0 22 1 keySpec Ljava/security/spec/KeySpec;
5 7 2 key Ljava/security/Key;
8 9 2 e Ljava/security/InvalidKeyException;
12 14 2 keyBytes [B
17 19 2 keyBytes [B
Exception table:
from to target type
4 6 7 Class java.security.InvalidKeyException
Exceptions:
throws java.security.spec.InvalidKeySpecException
MethodParameters:
Name Flags
keySpec
private byte[] getKeyBytes(javax.crypto.SecretKey);
descriptor: (Ljavax/crypto/SecretKey;)[B
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=3, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokevirtual sun.security.pkcs11.P11SecretKeyFactory.engineTranslateKey:(Ljavax/crypto/SecretKey;)Ljavax/crypto/SecretKey;
astore 1
1: ldc "RAW"
aload 1
invokeinterface javax.crypto.SecretKey.getFormat:()Ljava/lang/String;
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 5
2: new java.security.spec.InvalidKeySpecException
dup
3: ldc "Could not obtain key bytes"
4: invokespecial java.security.spec.InvalidKeySpecException.<init>:(Ljava/lang/String;)V
athrow
5: StackMap locals:
StackMap stack:
aload 1
invokeinterface javax.crypto.SecretKey.getEncoded:()[B
astore 2
start local 2 6: aload 2
7: areturn
end local 2 8: StackMap locals:
StackMap stack: java.security.InvalidKeyException
astore 2
start local 2 9: 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 10 0 this Lsun/security/pkcs11/P11SecretKeyFactory;
0 10 1 key Ljavax/crypto/SecretKey;
6 8 2 k [B
9 10 2 e Ljava/security/InvalidKeyException;
Exception table:
from to target type
0 7 8 Class java.security.InvalidKeyException
Exceptions:
throws java.security.spec.InvalidKeySpecException
MethodParameters:
Name Flags
key
protected java.security.spec.KeySpec engineGetKeySpec(javax.crypto.SecretKey, java.lang.Class);
descriptor: (Ljavax/crypto/SecretKey;Ljava/lang/Class;)Ljava/security/spec/KeySpec;
flags: (0x0004) ACC_PROTECTED
Code:
stack=5, locals=4, args_size=3
start local 0 start local 1 start local 2 0: aload 0
getfield sun.security.pkcs11.P11SecretKeyFactory.token:Lsun/security/pkcs11/Token;
invokevirtual sun.security.pkcs11.Token.ensureValid:()V
1: aload 1
ifnull 2
aload 2
ifnonnull 5
2: StackMap locals:
StackMap stack:
new java.security.spec.InvalidKeySpecException
dup
3: ldc "key and keySpec must not be null"
4: invokespecial java.security.spec.InvalidKeySpecException.<init>:(Ljava/lang/String;)V
athrow
5: StackMap locals:
StackMap stack:
ldc Ljavax/crypto/spec/SecretKeySpec;
aload 2
invokevirtual java.lang.Class.isAssignableFrom:(Ljava/lang/Class;)Z
ifeq 7
6: new javax.crypto.spec.SecretKeySpec
dup
aload 0
aload 1
invokevirtual sun.security.pkcs11.P11SecretKeyFactory.getKeyBytes:(Ljavax/crypto/SecretKey;)[B
aload 0
getfield sun.security.pkcs11.P11SecretKeyFactory.algorithm:Ljava/lang/String;
invokespecial javax.crypto.spec.SecretKeySpec.<init>:([BLjava/lang/String;)V
areturn
7: StackMap locals:
StackMap stack:
aload 0
getfield sun.security.pkcs11.P11SecretKeyFactory.algorithm:Ljava/lang/String;
ldc "DES"
invokevirtual java.lang.String.equalsIgnoreCase:(Ljava/lang/String;)Z
ifeq 13
8: ldc Ljavax/crypto/spec/DESKeySpec;
aload 2
invokevirtual java.lang.Class.isAssignableFrom:(Ljava/lang/Class;)Z
ifeq 19
9: new javax.crypto.spec.DESKeySpec
dup
aload 0
aload 1
invokevirtual sun.security.pkcs11.P11SecretKeyFactory.getKeyBytes:(Ljavax/crypto/SecretKey;)[B
invokespecial javax.crypto.spec.DESKeySpec.<init>:([B)V
10: areturn
11: StackMap locals:
StackMap stack: java.security.InvalidKeyException
astore 3
start local 3 12: new java.security.spec.InvalidKeySpecException
dup
aload 3
invokespecial java.security.spec.InvalidKeySpecException.<init>:(Ljava/lang/Throwable;)V
athrow
end local 3 13: StackMap locals:
StackMap stack:
aload 0
getfield sun.security.pkcs11.P11SecretKeyFactory.algorithm:Ljava/lang/String;
ldc "DESede"
invokevirtual java.lang.String.equalsIgnoreCase:(Ljava/lang/String;)Z
ifeq 19
14: ldc Ljavax/crypto/spec/DESedeKeySpec;
aload 2
invokevirtual java.lang.Class.isAssignableFrom:(Ljava/lang/Class;)Z
ifeq 19
15: new javax.crypto.spec.DESedeKeySpec
dup
aload 0
aload 1
invokevirtual sun.security.pkcs11.P11SecretKeyFactory.getKeyBytes:(Ljavax/crypto/SecretKey;)[B
invokespecial javax.crypto.spec.DESedeKeySpec.<init>:([B)V
16: areturn
17: StackMap locals:
StackMap stack: java.security.InvalidKeyException
astore 3
start local 3 18: new java.security.spec.InvalidKeySpecException
dup
aload 3
invokespecial java.security.spec.InvalidKeySpecException.<init>:(Ljava/lang/Throwable;)V
athrow
end local 3 19: StackMap locals:
StackMap stack:
new java.security.spec.InvalidKeySpecException
dup
20: new java.lang.StringBuilder
dup
ldc "Unsupported spec: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 2
invokevirtual java.lang.Class.getName:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
21: 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 22 0 this Lsun/security/pkcs11/P11SecretKeyFactory;
0 22 1 key Ljavax/crypto/SecretKey;
0 22 2 keySpec Ljava/lang/Class;
12 13 3 e Ljava/security/InvalidKeyException;
18 19 3 e Ljava/security/InvalidKeyException;
Exception table:
from to target type
8 10 11 Class java.security.InvalidKeyException
14 16 17 Class java.security.InvalidKeyException
Exceptions:
throws java.security.spec.InvalidKeySpecException
MethodParameters:
Name Flags
key
keySpec
protected javax.crypto.SecretKey engineTranslateKey(javax.crypto.SecretKey);
descriptor: (Ljavax/crypto/SecretKey;)Ljavax/crypto/SecretKey;
flags: (0x0004) ACC_PROTECTED
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield sun.security.pkcs11.P11SecretKeyFactory.token:Lsun/security/pkcs11/Token;
aload 1
aload 0
getfield sun.security.pkcs11.P11SecretKeyFactory.algorithm:Ljava/lang/String;
invokestatic sun.security.pkcs11.P11SecretKeyFactory.convertKey:(Lsun/security/pkcs11/Token;Ljava/security/Key;Ljava/lang/String;)Lsun/security/pkcs11/P11Key;
checkcast javax.crypto.SecretKey
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lsun/security/pkcs11/P11SecretKeyFactory;
0 1 1 key Ljavax/crypto/SecretKey;
Exceptions:
throws java.security.InvalidKeyException
MethodParameters:
Name Flags
key
}
SourceFile: "P11SecretKeyFactory.java"