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=4, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 1
aload 2
aconst_null
invokestatic sun.security.pkcs11.P11SecretKeyFactory.convertKey:(Lsun/security/pkcs11/Token;Ljava/security/Key;Ljava/lang/String;[Lsun/security/pkcs11/wrapper/CK_ATTRIBUTE;)Lsun/security/pkcs11/P11Key;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 token Lsun/security/pkcs11/Token;
0 1 1 key Ljava/security/Key;
0 1 2 algo Ljava/lang/String;
Exceptions:
throws java.security.InvalidKeyException
MethodParameters:
Name Flags
token
key
algo
static sun.security.pkcs11.P11Key convertKey(sun.security.pkcs11.Token, java.security.Key, java.lang.String, sun.security.pkcs11.wrapper.CK_ATTRIBUTE[]);
descriptor: (Lsun/security/pkcs11/Token;Ljava/security/Key;Ljava/lang/String;[Lsun/security/pkcs11/wrapper/CK_ATTRIBUTE;)Lsun/security/pkcs11/P11Key;
flags: (0x0008) ACC_STATIC
Code:
stack=6, locals=11, args_size=4
start local 0 start local 1 start local 2 start local 3 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 4
start local 4 8: goto 16
end local 4 9: StackMap locals:
StackMap stack:
aload 2
invokestatic sun.security.pkcs11.P11SecretKeyFactory.getKeyType:(Ljava/lang/String;)J
lstore 4
start local 4 10: aload 1
invokeinterface java.security.Key.getAlgorithm:()Ljava/lang/String;
invokestatic sun.security.pkcs11.P11SecretKeyFactory.getKeyType:(Ljava/lang/String;)J
lstore 6
start local 6 11: lload 4
lload 6
lcmp
ifeq 16
12: lload 4
ldc 2147483427
lcmp
ifeq 16
lload 4
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 6 16: StackMap locals: long
StackMap stack:
aload 1
instanceof sun.security.pkcs11.P11Key
ifeq 39
17: aload 1
checkcast sun.security.pkcs11.P11Key
astore 6
start local 6 18: aload 6
getfield sun.security.pkcs11.P11Key.token:Lsun/security/pkcs11/Token;
aload 0
if_acmpne 39
19: aload 3
ifnull 38
20: aconst_null
astore 7
start local 7 21: aload 0
invokevirtual sun.security.pkcs11.Token.getObjSession:()Lsun/security/pkcs11/Session;
astore 7
22: aload 0
getfield sun.security.pkcs11.Token.p11:Lsun/security/pkcs11/wrapper/PKCS11;
aload 7
invokevirtual sun.security.pkcs11.Session.id:()J
23: aload 6
getfield sun.security.pkcs11.P11Key.keyID:J
aload 3
24: invokevirtual sun.security.pkcs11.wrapper.PKCS11.C_CopyObject:(JJ[Lsun/security/pkcs11/wrapper/CK_ATTRIBUTE;)J
lstore 8
start local 8 25: aload 7
26: lload 8
aload 6
getfield sun.security.pkcs11.P11Key.algorithm:Ljava/lang/String;
aload 6
getfield sun.security.pkcs11.P11Key.keyLength:I
27: aload 3
28: 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 6
end local 8 29: goto 37
StackMap locals: sun.security.pkcs11.Token java.security.Key java.lang.String sun.security.pkcs11.wrapper.CK_ATTRIBUTE[] long sun.security.pkcs11.P11Key sun.security.pkcs11.Session
StackMap stack: sun.security.pkcs11.wrapper.PKCS11Exception
30: astore 8
start local 8 31: new java.security.InvalidKeyException
dup
32: ldc "Cannot duplicate the PKCS11 key"
aload 8
33: invokespecial java.security.InvalidKeyException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 8 34: StackMap locals:
StackMap stack: java.lang.Throwable
astore 10
35: aload 0
aload 7
invokevirtual sun.security.pkcs11.Token.releaseSession:(Lsun/security/pkcs11/Session;)Lsun/security/pkcs11/Session;
pop
36: aload 10
athrow
37: StackMap locals:
StackMap stack:
aload 0
aload 7
invokevirtual sun.security.pkcs11.Token.releaseSession:(Lsun/security/pkcs11/Session;)Lsun/security/pkcs11/Session;
pop
end local 7 38: StackMap locals:
StackMap stack:
aload 6
areturn
end local 6 39: 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 6
start local 6 40: aload 6
ifnull 42
41: aload 6
areturn
42: StackMap locals: sun.security.pkcs11.P11Key
StackMap stack:
ldc "RAW"
aload 1
invokeinterface java.security.Key.getFormat:()Ljava/lang/String;
invokevirtual java.lang.String.equalsIgnoreCase:(Ljava/lang/String;)Z
ifne 44
43: new java.security.InvalidKeyException
dup
ldc "Encoded format must be RAW"
invokespecial java.security.InvalidKeyException.<init>:(Ljava/lang/String;)V
athrow
44: StackMap locals:
StackMap stack:
aload 1
invokeinterface java.security.Key.getEncoded:()[B
astore 7
start local 7 45: aload 0
aload 7
aload 2
lload 4
aload 3
invokestatic sun.security.pkcs11.P11SecretKeyFactory.createKey:(Lsun/security/pkcs11/Token;[BLjava/lang/String;J[Lsun/security/pkcs11/wrapper/CK_ATTRIBUTE;)Lsun/security/pkcs11/P11Key;
astore 6
46: aload 0
getfield sun.security.pkcs11.Token.secretCache:Lsun/security/pkcs11/KeyCache;
aload 1
aload 6
invokevirtual sun.security.pkcs11.KeyCache.put:(Ljava/security/Key;Lsun/security/pkcs11/P11Key;)V
47: aload 6
areturn
end local 7 end local 6 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 48 0 token Lsun/security/pkcs11/Token;
0 48 1 key Ljava/security/Key;
0 48 2 algo Ljava/lang/String;
0 48 3 extraAttrs [Lsun/security/pkcs11/wrapper/CK_ATTRIBUTE;
8 9 4 algoType J
10 48 4 algoType J
11 16 6 keyAlgorithmType J
18 39 6 p11Key Lsun/security/pkcs11/P11Key;
21 38 7 session Lsun/security/pkcs11/Session;
25 29 8 newKeyID J
31 34 8 p11e Lsun/security/pkcs11/wrapper/PKCS11Exception;
40 48 6 p11Key Lsun/security/pkcs11/P11Key;
45 48 7 encoded [B
Exception table:
from to target type
21 29 30 Class sun.security.pkcs11.wrapper.PKCS11Exception
21 34 34 any
Exceptions:
throws java.security.InvalidKeyException
MethodParameters:
Name Flags
token
key
algo
extraAttrs
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, sun.security.pkcs11.wrapper.CK_ATTRIBUTE[]);
descriptor: (Lsun/security/pkcs11/Token;[BLjava/lang/String;J[Lsun/security/pkcs11/wrapper/CK_ATTRIBUTE;)Lsun/security/pkcs11/P11Key;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=8, locals=15, args_size=5
start local 0 start local 1 start local 2 start local 3 start local 5 0: aload 1
arraylength
iconst_3
ishl
istore 6
start local 6 1: iload 6
istore 7
start local 7 2: lload 3
l2i
lookupswitch { // 11
16: 28
18: 20
19: 3
21: 7
31: 17
32: 23
2147483427: 30
2147483428: 30
2147483429: 28
2147483430: 28
2147483431: 28
default: 36
}
3: StackMap locals: int int
StackMap stack:
ldc 288
iload 6
aload 0
invokestatic sun.security.pkcs11.P11KeyGenerator.checkKeySize:(JILsun/security/pkcs11/Token;)I
4: istore 7
5: aload 1
iconst_0
invokestatic sun.security.pkcs11.P11SecretKeyFactory.fixDESParity:([BI)V
6: goto 45
7: StackMap locals:
StackMap stack:
ldc 305
iload 6
aload 0
invokestatic sun.security.pkcs11.P11KeyGenerator.checkKeySize:(JILsun/security/pkcs11/Token;)I
8: istore 7
9: aload 1
iconst_0
invokestatic sun.security.pkcs11.P11SecretKeyFactory.fixDESParity:([BI)V
10: aload 1
bipush 8
invokestatic sun.security.pkcs11.P11SecretKeyFactory.fixDESParity:([BI)V
11: iload 7
bipush 112
if_icmpne 14
12: ldc 20
lstore 3
13: goto 45
14: StackMap locals:
StackMap stack:
ldc 21
lstore 3
15: aload 1
bipush 16
invokestatic sun.security.pkcs11.P11SecretKeyFactory.fixDESParity:([BI)V
16: goto 45
17: StackMap locals:
StackMap stack:
ldc 4224
iload 6
aload 0
invokestatic sun.security.pkcs11.P11KeyGenerator.checkKeySize:(JILsun/security/pkcs11/Token;)I
18: istore 7
19: goto 45
20: StackMap locals:
StackMap stack:
ldc 272
iload 6
aload 0
invokestatic sun.security.pkcs11.P11KeyGenerator.checkKeySize:(JILsun/security/pkcs11/Token;)I
21: istore 7
22: goto 45
23: StackMap locals:
StackMap stack:
ldc 4240
iload 6
24: aload 0
25: invokestatic sun.security.pkcs11.P11KeyGenerator.checkKeySize:(JILsun/security/pkcs11/Token;)I
26: istore 7
27: goto 45
28: StackMap locals:
StackMap stack:
ldc 16
lstore 3
29: goto 45
30: StackMap locals:
StackMap stack:
iload 6
ifne 34
31: new java.security.InvalidKeyException
dup
32: ldc "MAC keys must not be empty"
33: invokespecial java.security.InvalidKeyException.<init>:(Ljava/lang/String;)V
athrow
34: StackMap locals:
StackMap stack:
ldc 16
lstore 3
35: goto 45
36: 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
37: aload 2
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
38: invokespecial java.security.InvalidKeyException.<init>:(Ljava/lang/String;)V
athrow
39: StackMap locals:
StackMap stack: java.security.InvalidAlgorithmParameterException
astore 8
start local 8 40: new java.security.InvalidKeyException
dup
new java.lang.StringBuilder
dup
ldc "Invalid key for "
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;
41: aload 8
42: invokespecial java.security.InvalidKeyException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 8 43: StackMap locals:
StackMap stack: java.security.ProviderException
astore 8
start local 8 44: 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 45: StackMap locals:
StackMap stack:
aconst_null
astore 8
start local 8 46: aload 5
ifnull 52
47: iconst_3
aload 5
arraylength
iadd
anewarray sun.security.pkcs11.wrapper.CK_ATTRIBUTE
astore 9
start local 9 48: aload 5
iconst_0
aload 9
iconst_3
49: aload 5
arraylength
50: invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
51: goto 53
end local 9 52: StackMap locals: sun.security.pkcs11.Session
StackMap stack:
iconst_3
anewarray sun.security.pkcs11.wrapper.CK_ATTRIBUTE
astore 9
start local 9 53: StackMap locals: sun.security.pkcs11.wrapper.CK_ATTRIBUTE[]
StackMap stack:
aload 9
iconst_0
new sun.security.pkcs11.wrapper.CK_ATTRIBUTE
dup
lconst_0
ldc 4
invokespecial sun.security.pkcs11.wrapper.CK_ATTRIBUTE.<init>:(JJ)V
aastore
54: aload 9
iconst_1
new sun.security.pkcs11.wrapper.CK_ATTRIBUTE
dup
ldc 256
lload 3
invokespecial sun.security.pkcs11.wrapper.CK_ATTRIBUTE.<init>:(JJ)V
aastore
55: aload 9
iconst_2
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
56: aload 0
57: ldc "import"
ldc 4
lload 3
aload 9
58: invokevirtual sun.security.pkcs11.Token.getAttributes:(Ljava/lang/String;JJ[Lsun/security/pkcs11/wrapper/CK_ATTRIBUTE;)[Lsun/security/pkcs11/wrapper/CK_ATTRIBUTE;
astore 9
59: aload 0
invokevirtual sun.security.pkcs11.Token.getObjSession:()Lsun/security/pkcs11/Session;
astore 8
60: aload 0
getfield sun.security.pkcs11.Token.p11:Lsun/security/pkcs11/wrapper/PKCS11;
aload 8
invokevirtual sun.security.pkcs11.Session.id:()J
aload 9
invokevirtual sun.security.pkcs11.wrapper.PKCS11.C_CreateObject:(J[Lsun/security/pkcs11/wrapper/CK_ATTRIBUTE;)J
lstore 10
start local 10 61: aload 8
lload 10
aload 2
iload 7
aload 9
62: 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 12
start local 12 63: aload 12
astore 14
64: aload 0
aload 8
invokevirtual sun.security.pkcs11.Token.releaseSession:(Lsun/security/pkcs11/Session;)Lsun/security/pkcs11/Session;
pop
65: aload 14
areturn
end local 12 end local 10 end local 9 66: StackMap locals: sun.security.pkcs11.Token byte[] java.lang.String long sun.security.pkcs11.wrapper.CK_ATTRIBUTE[] int int sun.security.pkcs11.Session
StackMap stack: sun.security.pkcs11.wrapper.PKCS11Exception
astore 9
start local 9 67: new java.security.InvalidKeyException
dup
ldc "Could not create key"
aload 9
invokespecial java.security.InvalidKeyException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 9 68: StackMap locals:
StackMap stack: java.lang.Throwable
astore 13
69: aload 0
aload 8
invokevirtual sun.security.pkcs11.Token.releaseSession:(Lsun/security/pkcs11/Session;)Lsun/security/pkcs11/Session;
pop
70: aload 13
athrow
end local 8 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 71 0 token Lsun/security/pkcs11/Token;
0 71 1 encoded [B
0 71 2 algorithm Ljava/lang/String;
0 71 3 keyType J
0 71 5 extraAttrs [Lsun/security/pkcs11/wrapper/CK_ATTRIBUTE;
1 71 6 n I
2 71 7 keyLength I
40 43 8 iape Ljava/security/InvalidAlgorithmParameterException;
44 45 8 pe Ljava/security/ProviderException;
46 71 8 session Lsun/security/pkcs11/Session;
48 52 9 attributes [Lsun/security/pkcs11/wrapper/CK_ATTRIBUTE;
53 66 9 attributes [Lsun/security/pkcs11/wrapper/CK_ATTRIBUTE;
61 66 10 keyID J
63 66 12 p11Key Lsun/security/pkcs11/P11Key;
67 68 9 e Lsun/security/pkcs11/wrapper/PKCS11Exception;
Exception table:
from to target type
2 39 39 Class java.security.InvalidAlgorithmParameterException
2 39 43 Class java.security.ProviderException
46 64 66 Class sun.security.pkcs11.wrapper.PKCS11Exception
46 64 68 any
66 68 68 any
Exceptions:
throws java.security.InvalidKeyException
MethodParameters:
Name Flags
token
encoded
algorithm
keyType
extraAttrs
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.equalsIgnoreCase:(Ljava/lang/String;)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
Signature: (Ljavax/crypto/SecretKey;Ljava/lang/Class<*>;)Ljava/security/spec/KeySpec;
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"