public class org.bouncycastle.openssl.PKCS8Generator implements org.bouncycastle.util.io.pem.PemObjectGenerator
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.bouncycastle.openssl.PKCS8Generator
super_class: java.lang.Object
{
public static final java.lang.String AES_128_CBC;
descriptor: Ljava/lang/String;
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
public static final java.lang.String AES_192_CBC;
descriptor: Ljava/lang/String;
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
public static final java.lang.String AES_256_CBC;
descriptor: Ljava/lang/String;
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
public static final java.lang.String DES3_CBC;
descriptor: Ljava/lang/String;
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
public static final java.lang.String PBE_SHA1_RC4_128;
descriptor: Ljava/lang/String;
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
public static final java.lang.String PBE_SHA1_RC4_40;
descriptor: Ljava/lang/String;
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
public static final java.lang.String PBE_SHA1_3DES;
descriptor: Ljava/lang/String;
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
public static final java.lang.String PBE_SHA1_2DES;
descriptor: Ljava/lang/String;
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
public static final java.lang.String PBE_SHA1_RC2_128;
descriptor: Ljava/lang/String;
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
public static final java.lang.String PBE_SHA1_RC2_40;
descriptor: Ljava/lang/String;
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
private char[] password;
descriptor: [C
flags: (0x0002) ACC_PRIVATE
private java.lang.String algorithm;
descriptor: Ljava/lang/String;
flags: (0x0002) ACC_PRIVATE
private int iterationCount;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private java.security.PrivateKey key;
descriptor: Ljava/security/PrivateKey;
flags: (0x0002) ACC_PRIVATE
private javax.crypto.Cipher cipher;
descriptor: Ljavax/crypto/Cipher;
flags: (0x0002) ACC_PRIVATE
private java.security.SecureRandom random;
descriptor: Ljava/security/SecureRandom;
flags: (0x0002) ACC_PRIVATE
private java.security.AlgorithmParameterGenerator paramGen;
descriptor: Ljava/security/AlgorithmParameterGenerator;
flags: (0x0002) ACC_PRIVATE
private javax.crypto.SecretKeyFactory secKeyFact;
descriptor: Ljavax/crypto/SecretKeyFactory;
flags: (0x0002) ACC_PRIVATE
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: getstatic org.bouncycastle.asn1.nist.NISTObjectIdentifiers.id_aes128_CBC:Lorg/bouncycastle/asn1/ASN1ObjectIdentifier;
invokevirtual org.bouncycastle.asn1.ASN1ObjectIdentifier.getId:()Ljava/lang/String;
putstatic org.bouncycastle.openssl.PKCS8Generator.AES_128_CBC:Ljava/lang/String;
1: getstatic org.bouncycastle.asn1.nist.NISTObjectIdentifiers.id_aes192_CBC:Lorg/bouncycastle/asn1/ASN1ObjectIdentifier;
invokevirtual org.bouncycastle.asn1.ASN1ObjectIdentifier.getId:()Ljava/lang/String;
putstatic org.bouncycastle.openssl.PKCS8Generator.AES_192_CBC:Ljava/lang/String;
2: getstatic org.bouncycastle.asn1.nist.NISTObjectIdentifiers.id_aes256_CBC:Lorg/bouncycastle/asn1/ASN1ObjectIdentifier;
invokevirtual org.bouncycastle.asn1.ASN1ObjectIdentifier.getId:()Ljava/lang/String;
putstatic org.bouncycastle.openssl.PKCS8Generator.AES_256_CBC:Ljava/lang/String;
3: getstatic org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers.des_EDE3_CBC:Lorg/bouncycastle/asn1/ASN1ObjectIdentifier;
invokevirtual org.bouncycastle.asn1.ASN1ObjectIdentifier.getId:()Ljava/lang/String;
putstatic org.bouncycastle.openssl.PKCS8Generator.DES3_CBC:Ljava/lang/String;
4: getstatic org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers.pbeWithSHAAnd128BitRC4:Lorg/bouncycastle/asn1/ASN1ObjectIdentifier;
invokevirtual org.bouncycastle.asn1.ASN1ObjectIdentifier.getId:()Ljava/lang/String;
putstatic org.bouncycastle.openssl.PKCS8Generator.PBE_SHA1_RC4_128:Ljava/lang/String;
5: getstatic org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers.pbeWithSHAAnd40BitRC4:Lorg/bouncycastle/asn1/ASN1ObjectIdentifier;
invokevirtual org.bouncycastle.asn1.ASN1ObjectIdentifier.getId:()Ljava/lang/String;
putstatic org.bouncycastle.openssl.PKCS8Generator.PBE_SHA1_RC4_40:Ljava/lang/String;
6: getstatic org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers.pbeWithSHAAnd3_KeyTripleDES_CBC:Lorg/bouncycastle/asn1/ASN1ObjectIdentifier;
invokevirtual org.bouncycastle.asn1.ASN1ObjectIdentifier.getId:()Ljava/lang/String;
putstatic org.bouncycastle.openssl.PKCS8Generator.PBE_SHA1_3DES:Ljava/lang/String;
7: getstatic org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers.pbeWithSHAAnd2_KeyTripleDES_CBC:Lorg/bouncycastle/asn1/ASN1ObjectIdentifier;
invokevirtual org.bouncycastle.asn1.ASN1ObjectIdentifier.getId:()Ljava/lang/String;
putstatic org.bouncycastle.openssl.PKCS8Generator.PBE_SHA1_2DES:Ljava/lang/String;
8: getstatic org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers.pbeWithSHAAnd128BitRC2_CBC:Lorg/bouncycastle/asn1/ASN1ObjectIdentifier;
invokevirtual org.bouncycastle.asn1.ASN1ObjectIdentifier.getId:()Ljava/lang/String;
putstatic org.bouncycastle.openssl.PKCS8Generator.PBE_SHA1_RC2_128:Ljava/lang/String;
9: getstatic org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers.pbewithSHAAnd40BitRC2_CBC:Lorg/bouncycastle/asn1/ASN1ObjectIdentifier;
invokevirtual org.bouncycastle.asn1.ASN1ObjectIdentifier.getId:()Ljava/lang/String;
putstatic org.bouncycastle.openssl.PKCS8Generator.PBE_SHA1_RC2_40:Ljava/lang/String;
return
LocalVariableTable:
Start End Slot Name Signature
public void <init>(java.security.PrivateKey);
descriptor: (Ljava/security/PrivateKey;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
aload 1
putfield org.bouncycastle.openssl.PKCS8Generator.key:Ljava/security/PrivateKey;
2: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/bouncycastle/openssl/PKCS8Generator;
0 3 1 key Ljava/security/PrivateKey;
MethodParameters:
Name Flags
key
public void <init>(java.security.PrivateKey, java.lang.String, java.lang.String);
descriptor: (Ljava/security/PrivateKey;Ljava/lang/String;Ljava/lang/String;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=5, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 3
invokestatic java.security.Security.getProvider:(Ljava/lang/String;)Ljava/security/Provider;
astore 4
start local 4 2: aload 4
ifnonnull 4
3: new java.security.NoSuchProviderException
dup
new java.lang.StringBuilder
dup
ldc "cannot find provider: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 3
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.security.NoSuchProviderException.<init>:(Ljava/lang/String;)V
athrow
4: StackMap locals: org.bouncycastle.openssl.PKCS8Generator java.security.PrivateKey java.lang.String java.lang.String java.security.Provider
StackMap stack:
aload 0
aload 1
aload 2
aload 4
invokevirtual org.bouncycastle.openssl.PKCS8Generator.init:(Ljava/security/PrivateKey;Ljava/lang/String;Ljava/security/Provider;)V
5: return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/bouncycastle/openssl/PKCS8Generator;
0 6 1 key Ljava/security/PrivateKey;
0 6 2 algorithm Ljava/lang/String;
0 6 3 provider Ljava/lang/String;
2 6 4 prov Ljava/security/Provider;
Exceptions:
throws java.security.NoSuchProviderException, java.security.NoSuchAlgorithmException
MethodParameters:
Name Flags
key
algorithm
provider
public void <init>(java.security.PrivateKey, java.lang.String, java.security.Provider);
descriptor: (Ljava/security/PrivateKey;Ljava/lang/String;Ljava/security/Provider;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
aload 1
aload 2
aload 3
invokevirtual org.bouncycastle.openssl.PKCS8Generator.init:(Ljava/security/PrivateKey;Ljava/lang/String;Ljava/security/Provider;)V
2: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/bouncycastle/openssl/PKCS8Generator;
0 3 1 key Ljava/security/PrivateKey;
0 3 2 algorithm Ljava/lang/String;
0 3 3 provider Ljava/security/Provider;
Exceptions:
throws java.security.NoSuchAlgorithmException
MethodParameters:
Name Flags
key
algorithm
provider
private void init(java.security.PrivateKey, java.lang.String, java.security.Provider);
descriptor: (Ljava/security/PrivateKey;Ljava/lang/String;Ljava/security/Provider;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=5, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
aload 1
putfield org.bouncycastle.openssl.PKCS8Generator.key:Ljava/security/PrivateKey;
1: aload 0
aload 2
putfield org.bouncycastle.openssl.PKCS8Generator.algorithm:Ljava/lang/String;
2: aload 0
sipush 2048
putfield org.bouncycastle.openssl.PKCS8Generator.iterationCount:I
3: aload 0
aload 2
aload 3
invokestatic javax.crypto.Cipher.getInstance:(Ljava/lang/String;Ljava/security/Provider;)Ljavax/crypto/Cipher;
putfield org.bouncycastle.openssl.PKCS8Generator.cipher:Ljavax/crypto/Cipher;
4: goto 7
5: StackMap locals:
StackMap stack: javax.crypto.NoSuchPaddingException
astore 4
start local 4 6: new java.security.NoSuchAlgorithmException
dup
new java.lang.StringBuilder
dup
aload 2
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc " found, but padding not available: "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 4
invokevirtual javax.crypto.NoSuchPaddingException.getMessage:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.security.NoSuchAlgorithmException.<init>:(Ljava/lang/String;)V
athrow
end local 4 7: StackMap locals:
StackMap stack:
new org.bouncycastle.asn1.DERObjectIdentifier
dup
aload 2
invokespecial org.bouncycastle.asn1.DERObjectIdentifier.<init>:(Ljava/lang/String;)V
astore 4
start local 4 8: aload 4
invokestatic org.bouncycastle.openssl.PEMUtilities.isPKCS5Scheme2:(Lorg/bouncycastle/asn1/DERObjectIdentifier;)Z
ifeq 11
9: aload 0
aload 2
aload 3
invokestatic java.security.AlgorithmParameterGenerator.getInstance:(Ljava/lang/String;Ljava/security/Provider;)Ljava/security/AlgorithmParameterGenerator;
putfield org.bouncycastle.openssl.PKCS8Generator.paramGen:Ljava/security/AlgorithmParameterGenerator;
10: goto 12
11: StackMap locals: org.bouncycastle.asn1.DERObjectIdentifier
StackMap stack:
aload 0
aload 2
aload 3
invokestatic javax.crypto.SecretKeyFactory.getInstance:(Ljava/lang/String;Ljava/security/Provider;)Ljavax/crypto/SecretKeyFactory;
putfield org.bouncycastle.openssl.PKCS8Generator.secKeyFact:Ljavax/crypto/SecretKeyFactory;
12: StackMap locals:
StackMap stack:
return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 this Lorg/bouncycastle/openssl/PKCS8Generator;
0 13 1 key Ljava/security/PrivateKey;
0 13 2 algorithm Ljava/lang/String;
0 13 3 provider Ljava/security/Provider;
6 7 4 e Ljavax/crypto/NoSuchPaddingException;
8 13 4 algOID Lorg/bouncycastle/asn1/DERObjectIdentifier;
Exception table:
from to target type
3 4 5 Class javax.crypto.NoSuchPaddingException
Exceptions:
throws java.security.NoSuchAlgorithmException
MethodParameters:
Name Flags
key
algorithm
provider
public org.bouncycastle.openssl.PKCS8Generator setSecureRandom(java.security.SecureRandom);
descriptor: (Ljava/security/SecureRandom;)Lorg/bouncycastle/openssl/PKCS8Generator;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
putfield org.bouncycastle.openssl.PKCS8Generator.random:Ljava/security/SecureRandom;
1: aload 0
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/bouncycastle/openssl/PKCS8Generator;
0 2 1 random Ljava/security/SecureRandom;
MethodParameters:
Name Flags
random
public org.bouncycastle.openssl.PKCS8Generator setPassword(char[]);
descriptor: ([C)Lorg/bouncycastle/openssl/PKCS8Generator;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
putfield org.bouncycastle.openssl.PKCS8Generator.password:[C
1: aload 0
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/bouncycastle/openssl/PKCS8Generator;
0 2 1 password [C
MethodParameters:
Name Flags
password
public org.bouncycastle.openssl.PKCS8Generator setIterationCount(int);
descriptor: (I)Lorg/bouncycastle/openssl/PKCS8Generator;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
iload 1
putfield org.bouncycastle.openssl.PKCS8Generator.iterationCount:I
1: aload 0
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/bouncycastle/openssl/PKCS8Generator;
0 2 1 iterationCount I
MethodParameters:
Name Flags
iterationCount
public org.bouncycastle.util.io.pem.PemObject generate();
descriptor: ()Lorg/bouncycastle/util/io/pem/PemObject;
flags: (0x0001) ACC_PUBLIC
Code:
stack=10, locals=10, args_size=1
start local 0 0: aload 0
getfield org.bouncycastle.openssl.PKCS8Generator.key:Ljava/security/PrivateKey;
invokeinterface java.security.PrivateKey.getEncoded:()[B
astore 1
start local 1 1: aload 0
getfield org.bouncycastle.openssl.PKCS8Generator.algorithm:Ljava/lang/String;
ifnonnull 3
2: new org.bouncycastle.util.io.pem.PemObject
dup
ldc "PRIVATE KEY"
aload 1
invokespecial org.bouncycastle.util.io.pem.PemObject.<init>:(Ljava/lang/String;[B)V
areturn
3: StackMap locals: byte[]
StackMap stack:
new org.bouncycastle.asn1.DERObjectIdentifier
dup
aload 0
getfield org.bouncycastle.openssl.PKCS8Generator.algorithm:Ljava/lang/String;
invokespecial org.bouncycastle.asn1.DERObjectIdentifier.<init>:(Ljava/lang/String;)V
astore 2
start local 2 4: aload 2
invokestatic org.bouncycastle.openssl.PEMUtilities.isPKCS5Scheme2:(Lorg/bouncycastle/asn1/DERObjectIdentifier;)Z
ifeq 24
5: bipush 20
newarray 8
astore 3
start local 3 6: aload 0
getfield org.bouncycastle.openssl.PKCS8Generator.random:Ljava/security/SecureRandom;
ifnonnull 8
7: aload 0
new java.security.SecureRandom
dup
invokespecial java.security.SecureRandom.<init>:()V
putfield org.bouncycastle.openssl.PKCS8Generator.random:Ljava/security/SecureRandom;
8: StackMap locals: org.bouncycastle.asn1.DERObjectIdentifier byte[]
StackMap stack:
aload 0
getfield org.bouncycastle.openssl.PKCS8Generator.random:Ljava/security/SecureRandom;
aload 3
invokevirtual java.security.SecureRandom.nextBytes:([B)V
9: aload 0
getfield org.bouncycastle.openssl.PKCS8Generator.algorithm:Ljava/lang/String;
aload 0
getfield org.bouncycastle.openssl.PKCS8Generator.password:[C
aload 3
aload 0
getfield org.bouncycastle.openssl.PKCS8Generator.iterationCount:I
invokestatic org.bouncycastle.openssl.PEMUtilities.generateSecretKeyForPKCS5Scheme2:(Ljava/lang/String;[C[BI)Ljavax/crypto/SecretKey;
astore 4
start local 4 10: aload 0
getfield org.bouncycastle.openssl.PKCS8Generator.paramGen:Ljava/security/AlgorithmParameterGenerator;
invokevirtual java.security.AlgorithmParameterGenerator.generateParameters:()Ljava/security/AlgorithmParameters;
astore 5
start local 5 11: aload 0
getfield org.bouncycastle.openssl.PKCS8Generator.cipher:Ljavax/crypto/Cipher;
iconst_1
aload 4
aload 5
invokevirtual javax.crypto.Cipher.init:(ILjava/security/Key;Ljava/security/AlgorithmParameters;)V
12: new org.bouncycastle.asn1.pkcs.EncryptionScheme
dup
new org.bouncycastle.asn1.DERObjectIdentifier
dup
aload 0
getfield org.bouncycastle.openssl.PKCS8Generator.algorithm:Ljava/lang/String;
invokespecial org.bouncycastle.asn1.DERObjectIdentifier.<init>:(Ljava/lang/String;)V
aload 5
invokevirtual java.security.AlgorithmParameters.getEncoded:()[B
invokestatic org.bouncycastle.asn1.ASN1Object.fromByteArray:([B)Lorg/bouncycastle/asn1/ASN1Object;
invokespecial org.bouncycastle.asn1.pkcs.EncryptionScheme.<init>:(Lorg/bouncycastle/asn1/DERObjectIdentifier;Lorg/bouncycastle/asn1/DEREncodable;)V
astore 6
start local 6 13: new org.bouncycastle.asn1.pkcs.KeyDerivationFunc
dup
getstatic org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers.id_PBKDF2:Lorg/bouncycastle/asn1/ASN1ObjectIdentifier;
new org.bouncycastle.asn1.pkcs.PBKDF2Params
dup
aload 3
aload 0
getfield org.bouncycastle.openssl.PKCS8Generator.iterationCount:I
invokespecial org.bouncycastle.asn1.pkcs.PBKDF2Params.<init>:([BI)V
invokespecial org.bouncycastle.asn1.pkcs.KeyDerivationFunc.<init>:(Lorg/bouncycastle/asn1/DERObjectIdentifier;Lorg/bouncycastle/asn1/ASN1Encodable;)V
astore 7
start local 7 14: new org.bouncycastle.asn1.ASN1EncodableVector
dup
invokespecial org.bouncycastle.asn1.ASN1EncodableVector.<init>:()V
astore 8
start local 8 15: aload 8
aload 7
invokevirtual org.bouncycastle.asn1.ASN1EncodableVector.add:(Lorg/bouncycastle/asn1/DEREncodable;)V
16: aload 8
aload 6
invokevirtual org.bouncycastle.asn1.ASN1EncodableVector.add:(Lorg/bouncycastle/asn1/DEREncodable;)V
17: new org.bouncycastle.asn1.pkcs.EncryptedPrivateKeyInfo
dup
new org.bouncycastle.asn1.x509.AlgorithmIdentifier
dup
getstatic org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers.id_PBES2:Lorg/bouncycastle/asn1/ASN1ObjectIdentifier;
new org.bouncycastle.asn1.pkcs.PBES2Parameters
dup
new org.bouncycastle.asn1.DERSequence
dup
aload 8
invokespecial org.bouncycastle.asn1.DERSequence.<init>:(Lorg/bouncycastle/asn1/ASN1EncodableVector;)V
invokespecial org.bouncycastle.asn1.pkcs.PBES2Parameters.<init>:(Lorg/bouncycastle/asn1/ASN1Sequence;)V
invokespecial org.bouncycastle.asn1.x509.AlgorithmIdentifier.<init>:(Lorg/bouncycastle/asn1/DERObjectIdentifier;Lorg/bouncycastle/asn1/DEREncodable;)V
aload 0
getfield org.bouncycastle.openssl.PKCS8Generator.cipher:Ljavax/crypto/Cipher;
aload 1
invokevirtual javax.crypto.Cipher.doFinal:([B)[B
invokespecial org.bouncycastle.asn1.pkcs.EncryptedPrivateKeyInfo.<init>:(Lorg/bouncycastle/asn1/x509/AlgorithmIdentifier;[B)V
astore 9
start local 9 18: new org.bouncycastle.util.io.pem.PemObject
dup
ldc "ENCRYPTED PRIVATE KEY"
aload 9
invokevirtual org.bouncycastle.asn1.pkcs.EncryptedPrivateKeyInfo.getEncoded:()[B
invokespecial org.bouncycastle.util.io.pem.PemObject.<init>:(Ljava/lang/String;[B)V
19: areturn
end local 9 end local 8 end local 7 end local 6 20: StackMap locals: org.bouncycastle.openssl.PKCS8Generator byte[] org.bouncycastle.asn1.DERObjectIdentifier byte[] javax.crypto.SecretKey java.security.AlgorithmParameters
StackMap stack: java.io.IOException
astore 6
start local 6 21: new org.bouncycastle.util.io.pem.PemGenerationException
dup
aload 6
invokevirtual java.io.IOException.getMessage:()Ljava/lang/String;
aload 6
invokespecial org.bouncycastle.util.io.pem.PemGenerationException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 6 22: StackMap locals:
StackMap stack: java.security.GeneralSecurityException
astore 6
start local 6 23: new org.bouncycastle.util.io.pem.PemGenerationException
dup
aload 6
invokevirtual java.security.GeneralSecurityException.getMessage:()Ljava/lang/String;
aload 6
invokespecial org.bouncycastle.util.io.pem.PemGenerationException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 6 end local 5 end local 4 end local 3 24: StackMap locals:
StackMap stack:
aload 2
invokestatic org.bouncycastle.openssl.PEMUtilities.isPKCS12:(Lorg/bouncycastle/asn1/DERObjectIdentifier;)Z
ifeq 42
25: bipush 20
newarray 8
astore 3
start local 3 26: aload 0
getfield org.bouncycastle.openssl.PKCS8Generator.random:Ljava/security/SecureRandom;
ifnonnull 28
27: aload 0
new java.security.SecureRandom
dup
invokespecial java.security.SecureRandom.<init>:()V
putfield org.bouncycastle.openssl.PKCS8Generator.random:Ljava/security/SecureRandom;
28: StackMap locals: byte[]
StackMap stack:
aload 0
getfield org.bouncycastle.openssl.PKCS8Generator.random:Ljava/security/SecureRandom;
aload 3
invokevirtual java.security.SecureRandom.nextBytes:([B)V
29: new javax.crypto.spec.PBEKeySpec
dup
aload 0
getfield org.bouncycastle.openssl.PKCS8Generator.password:[C
invokespecial javax.crypto.spec.PBEKeySpec.<init>:([C)V
astore 4
start local 4 30: new javax.crypto.spec.PBEParameterSpec
dup
aload 3
aload 0
getfield org.bouncycastle.openssl.PKCS8Generator.iterationCount:I
invokespecial javax.crypto.spec.PBEParameterSpec.<init>:([BI)V
astore 5
start local 5 31: aload 0
getfield org.bouncycastle.openssl.PKCS8Generator.cipher:Ljavax/crypto/Cipher;
iconst_1
aload 0
getfield org.bouncycastle.openssl.PKCS8Generator.secKeyFact:Ljavax/crypto/SecretKeyFactory;
aload 4
invokevirtual javax.crypto.SecretKeyFactory.generateSecret:(Ljava/security/spec/KeySpec;)Ljavax/crypto/SecretKey;
aload 5
invokevirtual javax.crypto.Cipher.init:(ILjava/security/Key;Ljava/security/spec/AlgorithmParameterSpec;)V
32: new org.bouncycastle.asn1.ASN1EncodableVector
dup
invokespecial org.bouncycastle.asn1.ASN1EncodableVector.<init>:()V
astore 6
start local 6 33: aload 6
new org.bouncycastle.asn1.DEROctetString
dup
aload 3
invokespecial org.bouncycastle.asn1.DEROctetString.<init>:([B)V
invokevirtual org.bouncycastle.asn1.ASN1EncodableVector.add:(Lorg/bouncycastle/asn1/DEREncodable;)V
34: aload 6
new org.bouncycastle.asn1.DERInteger
dup
aload 0
getfield org.bouncycastle.openssl.PKCS8Generator.iterationCount:I
invokespecial org.bouncycastle.asn1.DERInteger.<init>:(I)V
invokevirtual org.bouncycastle.asn1.ASN1EncodableVector.add:(Lorg/bouncycastle/asn1/DEREncodable;)V
35: new org.bouncycastle.asn1.pkcs.EncryptedPrivateKeyInfo
dup
new org.bouncycastle.asn1.x509.AlgorithmIdentifier
dup
aload 2
new org.bouncycastle.asn1.pkcs.PKCS12PBEParams
dup
new org.bouncycastle.asn1.DERSequence
dup
aload 6
invokespecial org.bouncycastle.asn1.DERSequence.<init>:(Lorg/bouncycastle/asn1/ASN1EncodableVector;)V
invokespecial org.bouncycastle.asn1.pkcs.PKCS12PBEParams.<init>:(Lorg/bouncycastle/asn1/ASN1Sequence;)V
invokespecial org.bouncycastle.asn1.x509.AlgorithmIdentifier.<init>:(Lorg/bouncycastle/asn1/DERObjectIdentifier;Lorg/bouncycastle/asn1/DEREncodable;)V
aload 0
getfield org.bouncycastle.openssl.PKCS8Generator.cipher:Ljavax/crypto/Cipher;
aload 1
invokevirtual javax.crypto.Cipher.doFinal:([B)[B
invokespecial org.bouncycastle.asn1.pkcs.EncryptedPrivateKeyInfo.<init>:(Lorg/bouncycastle/asn1/x509/AlgorithmIdentifier;[B)V
astore 7
start local 7 36: new org.bouncycastle.util.io.pem.PemObject
dup
ldc "ENCRYPTED PRIVATE KEY"
aload 7
invokevirtual org.bouncycastle.asn1.pkcs.EncryptedPrivateKeyInfo.getEncoded:()[B
invokespecial org.bouncycastle.util.io.pem.PemObject.<init>:(Ljava/lang/String;[B)V
37: areturn
end local 7 end local 6 end local 5 end local 4 38: StackMap locals:
StackMap stack: java.io.IOException
astore 4
start local 4 39: new org.bouncycastle.util.io.pem.PemGenerationException
dup
aload 4
invokevirtual java.io.IOException.getMessage:()Ljava/lang/String;
aload 4
invokespecial org.bouncycastle.util.io.pem.PemGenerationException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 4 40: StackMap locals:
StackMap stack: java.security.GeneralSecurityException
astore 4
start local 4 41: new org.bouncycastle.util.io.pem.PemGenerationException
dup
aload 4
invokevirtual java.security.GeneralSecurityException.getMessage:()Ljava/lang/String;
aload 4
invokespecial org.bouncycastle.util.io.pem.PemGenerationException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 4 end local 3 42: StackMap locals:
StackMap stack:
new org.bouncycastle.util.io.pem.PemGenerationException
dup
new java.lang.StringBuilder
dup
ldc "unknown algorithm: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
getfield org.bouncycastle.openssl.PKCS8Generator.algorithm:Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial org.bouncycastle.util.io.pem.PemGenerationException.<init>:(Ljava/lang/String;)V
athrow
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 43 0 this Lorg/bouncycastle/openssl/PKCS8Generator;
1 43 1 keyData [B
4 43 2 algOID Lorg/bouncycastle/asn1/DERObjectIdentifier;
6 24 3 salt [B
10 24 4 key Ljavax/crypto/SecretKey;
11 24 5 params Ljava/security/AlgorithmParameters;
13 20 6 scheme Lorg/bouncycastle/asn1/pkcs/EncryptionScheme;
14 20 7 func Lorg/bouncycastle/asn1/pkcs/KeyDerivationFunc;
15 20 8 v Lorg/bouncycastle/asn1/ASN1EncodableVector;
18 20 9 info Lorg/bouncycastle/asn1/pkcs/EncryptedPrivateKeyInfo;
21 22 6 e Ljava/io/IOException;
23 24 6 e Ljava/security/GeneralSecurityException;
26 42 3 salt [B
30 38 4 pbeSpec Ljavax/crypto/spec/PBEKeySpec;
31 38 5 defParams Ljavax/crypto/spec/PBEParameterSpec;
33 38 6 v Lorg/bouncycastle/asn1/ASN1EncodableVector;
36 38 7 info Lorg/bouncycastle/asn1/pkcs/EncryptedPrivateKeyInfo;
39 40 4 e Ljava/io/IOException;
41 42 4 e Ljava/security/GeneralSecurityException;
Exception table:
from to target type
11 19 20 Class java.io.IOException
11 19 22 Class java.security.GeneralSecurityException
29 37 38 Class java.io.IOException
29 37 40 Class java.security.GeneralSecurityException
Exceptions:
throws org.bouncycastle.util.io.pem.PemGenerationException
}
SourceFile: "PKCS8Generator.java"