public class org.bouncycastle.openssl.MiscPEMGenerator 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.MiscPEMGenerator
super_class: java.lang.Object
{
private java.lang.Object obj;
descriptor: Ljava/lang/Object;
flags: (0x0002) ACC_PRIVATE
private java.lang.String algorithm;
descriptor: Ljava/lang/String;
flags: (0x0002) ACC_PRIVATE
private char[] password;
descriptor: [C
flags: (0x0002) ACC_PRIVATE
private java.security.SecureRandom random;
descriptor: Ljava/security/SecureRandom;
flags: (0x0002) ACC_PRIVATE
private java.security.Provider provider;
descriptor: Ljava/security/Provider;
flags: (0x0002) ACC_PRIVATE
public void <init>(java.lang.Object);
descriptor: (Ljava/lang/Object;)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.MiscPEMGenerator.obj:Ljava/lang/Object;
2: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/bouncycastle/openssl/MiscPEMGenerator;
0 3 1 o Ljava/lang/Object;
MethodParameters:
Name Flags
o
public void <init>(java.lang.Object, java.lang.String, char[], java.security.SecureRandom, java.security.Provider);
descriptor: (Ljava/lang/Object;Ljava/lang/String;[CLjava/security/SecureRandom;Ljava/security/Provider;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=6, args_size=6
start local 0 start local 1 start local 2 start local 3 start local 4 start local 5 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
aload 1
putfield org.bouncycastle.openssl.MiscPEMGenerator.obj:Ljava/lang/Object;
2: aload 0
aload 2
putfield org.bouncycastle.openssl.MiscPEMGenerator.algorithm:Ljava/lang/String;
3: aload 0
aload 3
putfield org.bouncycastle.openssl.MiscPEMGenerator.password:[C
4: aload 0
aload 4
putfield org.bouncycastle.openssl.MiscPEMGenerator.random:Ljava/security/SecureRandom;
5: aload 0
aload 5
putfield org.bouncycastle.openssl.MiscPEMGenerator.provider:Ljava/security/Provider;
6: return
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 7 0 this Lorg/bouncycastle/openssl/MiscPEMGenerator;
0 7 1 obj Ljava/lang/Object;
0 7 2 algorithm Ljava/lang/String;
0 7 3 password [C
0 7 4 random Ljava/security/SecureRandom;
0 7 5 provider Ljava/security/Provider;
MethodParameters:
Name Flags
obj
algorithm
password
random
provider
public void <init>(java.lang.Object, java.lang.String, char[], java.security.SecureRandom, java.lang.String);
descriptor: (Ljava/lang/Object;Ljava/lang/String;[CLjava/security/SecureRandom;Ljava/lang/String;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=6, args_size=6
start local 0 start local 1 start local 2 start local 3 start local 4 start local 5 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
aload 1
putfield org.bouncycastle.openssl.MiscPEMGenerator.obj:Ljava/lang/Object;
2: aload 0
aload 2
putfield org.bouncycastle.openssl.MiscPEMGenerator.algorithm:Ljava/lang/String;
3: aload 0
aload 3
putfield org.bouncycastle.openssl.MiscPEMGenerator.password:[C
4: aload 0
aload 4
putfield org.bouncycastle.openssl.MiscPEMGenerator.random:Ljava/security/SecureRandom;
5: aload 5
ifnull 9
6: aload 0
aload 5
invokestatic java.security.Security.getProvider:(Ljava/lang/String;)Ljava/security/Provider;
putfield org.bouncycastle.openssl.MiscPEMGenerator.provider:Ljava/security/Provider;
7: aload 0
getfield org.bouncycastle.openssl.MiscPEMGenerator.provider:Ljava/security/Provider;
ifnonnull 9
8: new java.security.NoSuchProviderException
dup
new java.lang.StringBuilder
dup
ldc "cannot find provider: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 5
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
9: StackMap locals: org.bouncycastle.openssl.MiscPEMGenerator java.lang.Object java.lang.String char[] java.security.SecureRandom java.lang.String
StackMap stack:
return
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 10 0 this Lorg/bouncycastle/openssl/MiscPEMGenerator;
0 10 1 obj Ljava/lang/Object;
0 10 2 algorithm Ljava/lang/String;
0 10 3 password [C
0 10 4 random Ljava/security/SecureRandom;
0 10 5 provider Ljava/lang/String;
Exceptions:
throws java.security.NoSuchProviderException
MethodParameters:
Name Flags
obj
algorithm
password
random
provider
private org.bouncycastle.util.io.pem.PemObject createPemObject(java.lang.Object);
descriptor: (Ljava/lang/Object;)Lorg/bouncycastle/util/io/pem/PemObject;
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=9, args_size=2
start local 0 start local 1 0: aload 1
instanceof org.bouncycastle.util.io.pem.PemObject
ifeq 2
1: aload 1
checkcast org.bouncycastle.util.io.pem.PemObject
areturn
2: StackMap locals:
StackMap stack:
aload 1
instanceof org.bouncycastle.util.io.pem.PemObjectGenerator
ifeq 4
3: aload 1
checkcast org.bouncycastle.util.io.pem.PemObjectGenerator
invokeinterface org.bouncycastle.util.io.pem.PemObjectGenerator.generate:()Lorg/bouncycastle/util/io/pem/PemObject;
areturn
4: StackMap locals:
StackMap stack:
aload 1
instanceof java.security.cert.X509Certificate
ifeq 10
5: ldc "CERTIFICATE"
astore 2
start local 2 6: aload 1
checkcast java.security.cert.X509Certificate
invokevirtual java.security.cert.X509Certificate.getEncoded:()[B
astore 3
start local 3 7: goto 62
end local 3 8: StackMap locals: org.bouncycastle.openssl.MiscPEMGenerator java.lang.Object java.lang.String
StackMap stack: java.security.cert.CertificateEncodingException
astore 4
start local 4 9: new org.bouncycastle.util.io.pem.PemGenerationException
dup
new java.lang.StringBuilder
dup
ldc "Cannot encode object: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 4
invokevirtual java.security.cert.CertificateEncodingException.toString:()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 4 end local 2 10: StackMap locals:
StackMap stack:
aload 1
instanceof java.security.cert.X509CRL
ifeq 16
11: ldc "X509 CRL"
astore 2
start local 2 12: aload 1
checkcast java.security.cert.X509CRL
invokevirtual java.security.cert.X509CRL.getEncoded:()[B
astore 3
start local 3 13: goto 62
end local 3 14: StackMap locals: org.bouncycastle.openssl.MiscPEMGenerator java.lang.Object java.lang.String
StackMap stack: java.security.cert.CRLException
astore 4
start local 4 15: new org.bouncycastle.util.io.pem.PemGenerationException
dup
new java.lang.StringBuilder
dup
ldc "Cannot encode object: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 4
invokevirtual java.security.cert.CRLException.toString:()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 4 end local 2 16: StackMap locals:
StackMap stack:
aload 1
instanceof java.security.KeyPair
ifeq 18
17: aload 0
aload 1
checkcast java.security.KeyPair
invokevirtual java.security.KeyPair.getPrivate:()Ljava/security/PrivateKey;
invokevirtual org.bouncycastle.openssl.MiscPEMGenerator.createPemObject:(Ljava/lang/Object;)Lorg/bouncycastle/util/io/pem/PemObject;
areturn
18: StackMap locals:
StackMap stack:
aload 1
instanceof java.security.PrivateKey
ifeq 45
19: new org.bouncycastle.asn1.pkcs.PrivateKeyInfo
dup
20: aload 1
checkcast java.security.Key
invokeinterface java.security.Key.getEncoded:()[B
invokestatic org.bouncycastle.asn1.ASN1Object.fromByteArray:([B)Lorg/bouncycastle/asn1/ASN1Object;
checkcast org.bouncycastle.asn1.ASN1Sequence
21: invokespecial org.bouncycastle.asn1.pkcs.PrivateKeyInfo.<init>:(Lorg/bouncycastle/asn1/ASN1Sequence;)V
astore 4
start local 4 22: aload 1
instanceof java.security.interfaces.RSAPrivateKey
ifeq 26
23: ldc "RSA PRIVATE KEY"
astore 2
start local 2 24: aload 4
invokevirtual org.bouncycastle.asn1.pkcs.PrivateKeyInfo.getPrivateKey:()Lorg/bouncycastle/asn1/DERObject;
invokevirtual org.bouncycastle.asn1.DERObject.getEncoded:()[B
astore 3
start local 3 25: goto 62
end local 3 end local 2 26: StackMap locals: org.bouncycastle.openssl.MiscPEMGenerator java.lang.Object top top org.bouncycastle.asn1.pkcs.PrivateKeyInfo
StackMap stack:
aload 1
instanceof java.security.interfaces.DSAPrivateKey
ifeq 40
27: ldc "DSA PRIVATE KEY"
astore 2
start local 2 28: aload 4
invokevirtual org.bouncycastle.asn1.pkcs.PrivateKeyInfo.getAlgorithmId:()Lorg/bouncycastle/asn1/x509/AlgorithmIdentifier;
invokevirtual org.bouncycastle.asn1.x509.AlgorithmIdentifier.getParameters:()Lorg/bouncycastle/asn1/DEREncodable;
invokestatic org.bouncycastle.asn1.x509.DSAParameter.getInstance:(Ljava/lang/Object;)Lorg/bouncycastle/asn1/x509/DSAParameter;
astore 5
start local 5 29: new org.bouncycastle.asn1.ASN1EncodableVector
dup
invokespecial org.bouncycastle.asn1.ASN1EncodableVector.<init>:()V
astore 6
start local 6 30: aload 6
new org.bouncycastle.asn1.DERInteger
dup
iconst_0
invokespecial org.bouncycastle.asn1.DERInteger.<init>:(I)V
invokevirtual org.bouncycastle.asn1.ASN1EncodableVector.add:(Lorg/bouncycastle/asn1/DEREncodable;)V
31: aload 6
new org.bouncycastle.asn1.DERInteger
dup
aload 5
invokevirtual org.bouncycastle.asn1.x509.DSAParameter.getP:()Ljava/math/BigInteger;
invokespecial org.bouncycastle.asn1.DERInteger.<init>:(Ljava/math/BigInteger;)V
invokevirtual org.bouncycastle.asn1.ASN1EncodableVector.add:(Lorg/bouncycastle/asn1/DEREncodable;)V
32: aload 6
new org.bouncycastle.asn1.DERInteger
dup
aload 5
invokevirtual org.bouncycastle.asn1.x509.DSAParameter.getQ:()Ljava/math/BigInteger;
invokespecial org.bouncycastle.asn1.DERInteger.<init>:(Ljava/math/BigInteger;)V
invokevirtual org.bouncycastle.asn1.ASN1EncodableVector.add:(Lorg/bouncycastle/asn1/DEREncodable;)V
33: aload 6
new org.bouncycastle.asn1.DERInteger
dup
aload 5
invokevirtual org.bouncycastle.asn1.x509.DSAParameter.getG:()Ljava/math/BigInteger;
invokespecial org.bouncycastle.asn1.DERInteger.<init>:(Ljava/math/BigInteger;)V
invokevirtual org.bouncycastle.asn1.ASN1EncodableVector.add:(Lorg/bouncycastle/asn1/DEREncodable;)V
34: aload 1
checkcast java.security.interfaces.DSAPrivateKey
invokeinterface java.security.interfaces.DSAPrivateKey.getX:()Ljava/math/BigInteger;
astore 7
start local 7 35: aload 5
invokevirtual org.bouncycastle.asn1.x509.DSAParameter.getG:()Ljava/math/BigInteger;
aload 7
aload 5
invokevirtual org.bouncycastle.asn1.x509.DSAParameter.getP:()Ljava/math/BigInteger;
invokevirtual java.math.BigInteger.modPow:(Ljava/math/BigInteger;Ljava/math/BigInteger;)Ljava/math/BigInteger;
astore 8
start local 8 36: aload 6
new org.bouncycastle.asn1.DERInteger
dup
aload 8
invokespecial org.bouncycastle.asn1.DERInteger.<init>:(Ljava/math/BigInteger;)V
invokevirtual org.bouncycastle.asn1.ASN1EncodableVector.add:(Lorg/bouncycastle/asn1/DEREncodable;)V
37: aload 6
new org.bouncycastle.asn1.DERInteger
dup
aload 7
invokespecial org.bouncycastle.asn1.DERInteger.<init>:(Ljava/math/BigInteger;)V
invokevirtual org.bouncycastle.asn1.ASN1EncodableVector.add:(Lorg/bouncycastle/asn1/DEREncodable;)V
38: new org.bouncycastle.asn1.DERSequence
dup
aload 6
invokespecial org.bouncycastle.asn1.DERSequence.<init>:(Lorg/bouncycastle/asn1/ASN1EncodableVector;)V
invokevirtual org.bouncycastle.asn1.DERSequence.getEncoded:()[B
astore 3
end local 8 end local 7 end local 6 end local 5 start local 3 39: goto 62
end local 3 end local 2 40: StackMap locals:
StackMap stack:
aload 1
checkcast java.security.PrivateKey
invokeinterface java.security.PrivateKey.getAlgorithm:()Ljava/lang/String;
ldc "ECDSA"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 44
41: ldc "EC PRIVATE KEY"
astore 2
start local 2 42: aload 4
invokevirtual org.bouncycastle.asn1.pkcs.PrivateKeyInfo.getPrivateKey:()Lorg/bouncycastle/asn1/DERObject;
invokevirtual org.bouncycastle.asn1.DERObject.getEncoded:()[B
astore 3
start local 3 43: goto 62
end local 3 end local 2 44: StackMap locals:
StackMap stack:
new java.io.IOException
dup
ldc "Cannot identify private key"
invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
athrow
end local 4 45: StackMap locals: org.bouncycastle.openssl.MiscPEMGenerator java.lang.Object
StackMap stack:
aload 1
instanceof java.security.PublicKey
ifeq 49
46: ldc "PUBLIC KEY"
astore 2
start local 2 47: aload 1
checkcast java.security.PublicKey
invokeinterface java.security.PublicKey.getEncoded:()[B
astore 3
start local 3 48: goto 62
end local 3 end local 2 49: StackMap locals:
StackMap stack:
aload 1
instanceof org.bouncycastle.x509.X509AttributeCertificate
ifeq 53
50: ldc "ATTRIBUTE CERTIFICATE"
astore 2
start local 2 51: aload 1
checkcast org.bouncycastle.x509.X509V2AttributeCertificate
invokevirtual org.bouncycastle.x509.X509V2AttributeCertificate.getEncoded:()[B
astore 3
start local 3 52: goto 62
end local 3 end local 2 53: StackMap locals:
StackMap stack:
aload 1
instanceof org.bouncycastle.jce.PKCS10CertificationRequest
ifeq 57
54: ldc "CERTIFICATE REQUEST"
astore 2
start local 2 55: aload 1
checkcast org.bouncycastle.jce.PKCS10CertificationRequest
invokevirtual org.bouncycastle.jce.PKCS10CertificationRequest.getEncoded:()[B
astore 3
start local 3 56: goto 62
end local 3 end local 2 57: StackMap locals:
StackMap stack:
aload 1
instanceof org.bouncycastle.asn1.cms.ContentInfo
ifeq 61
58: ldc "PKCS7"
astore 2
start local 2 59: aload 1
checkcast org.bouncycastle.asn1.cms.ContentInfo
invokevirtual org.bouncycastle.asn1.cms.ContentInfo.getEncoded:()[B
astore 3
start local 3 60: goto 62
end local 3 end local 2 61: StackMap locals:
StackMap stack:
new org.bouncycastle.util.io.pem.PemGenerationException
dup
ldc "unknown object passed - can't encode."
invokespecial org.bouncycastle.util.io.pem.PemGenerationException.<init>:(Ljava/lang/String;)V
athrow
start local 2 start local 3 62: StackMap locals: java.lang.String byte[]
StackMap stack:
new org.bouncycastle.util.io.pem.PemObject
dup
aload 2
aload 3
invokespecial org.bouncycastle.util.io.pem.PemObject.<init>:(Ljava/lang/String;[B)V
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 63 0 this Lorg/bouncycastle/openssl/MiscPEMGenerator;
0 63 1 o Ljava/lang/Object;
6 10 2 type Ljava/lang/String;
12 16 2 type Ljava/lang/String;
24 26 2 type Ljava/lang/String;
28 40 2 type Ljava/lang/String;
42 44 2 type Ljava/lang/String;
47 49 2 type Ljava/lang/String;
51 53 2 type Ljava/lang/String;
55 57 2 type Ljava/lang/String;
59 61 2 type Ljava/lang/String;
62 63 2 type Ljava/lang/String;
7 8 3 encoding [B
13 14 3 encoding [B
25 26 3 encoding [B
39 40 3 encoding [B
43 44 3 encoding [B
48 49 3 encoding [B
52 53 3 encoding [B
56 57 3 encoding [B
60 61 3 encoding [B
62 63 3 encoding [B
9 10 4 e Ljava/security/cert/CertificateEncodingException;
15 16 4 e Ljava/security/cert/CRLException;
22 45 4 info Lorg/bouncycastle/asn1/pkcs/PrivateKeyInfo;
29 39 5 p Lorg/bouncycastle/asn1/x509/DSAParameter;
30 39 6 v Lorg/bouncycastle/asn1/ASN1EncodableVector;
35 39 7 x Ljava/math/BigInteger;
36 39 8 y Ljava/math/BigInteger;
Exception table:
from to target type
6 7 8 Class java.security.cert.CertificateEncodingException
12 13 14 Class java.security.cert.CRLException
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
o
private java.lang.String getHexEncoded(byte[]);
descriptor: ([B)Ljava/lang/String;
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=4, args_size=2
start local 0 start local 1 0: aload 1
invokestatic org.bouncycastle.util.encoders.Hex.encode:([B)[B
astore 1
1: aload 1
arraylength
newarray 5
astore 2
start local 2 2: iconst_0
istore 3
start local 3 3: goto 6
4: StackMap locals: char[] int
StackMap stack:
aload 2
iload 3
aload 1
iload 3
baload
i2c
castore
5: iinc 3 1
StackMap locals:
StackMap stack:
6: iload 3
aload 1
arraylength
if_icmpne 4
end local 3 7: new java.lang.String
dup
aload 2
invokespecial java.lang.String.<init>:([C)V
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lorg/bouncycastle/openssl/MiscPEMGenerator;
0 8 1 bytes [B
2 8 2 chars [C
3 7 3 i I
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
bytes
private org.bouncycastle.util.io.pem.PemObject createPemObject(java.lang.Object, java.lang.String, char[], java.security.SecureRandom);
descriptor: (Ljava/lang/Object;Ljava/lang/String;[CLjava/security/SecureRandom;)Lorg/bouncycastle/util/io/pem/PemObject;
flags: (0x0002) ACC_PRIVATE
Code:
stack=10, locals=12, args_size=5
start local 0 start local 1 start local 2 start local 3 start local 4 0: aload 1
instanceof java.security.KeyPair
ifeq 2
1: aload 0
aload 1
checkcast java.security.KeyPair
invokevirtual java.security.KeyPair.getPrivate:()Ljava/security/PrivateKey;
aload 2
aload 3
aload 4
invokevirtual org.bouncycastle.openssl.MiscPEMGenerator.createPemObject:(Ljava/lang/Object;Ljava/lang/String;[CLjava/security/SecureRandom;)Lorg/bouncycastle/util/io/pem/PemObject;
areturn
2: StackMap locals:
StackMap stack:
aconst_null
astore 5
start local 5 3: aconst_null
astore 6
start local 6 4: aload 1
instanceof java.security.interfaces.RSAPrivateCrtKey
ifeq 19
5: ldc "RSA PRIVATE KEY"
astore 5
6: aload 1
checkcast java.security.interfaces.RSAPrivateCrtKey
astore 7
start local 7 7: new org.bouncycastle.asn1.pkcs.RSAPrivateKeyStructure
dup
8: aload 7
invokeinterface java.security.interfaces.RSAPrivateCrtKey.getModulus:()Ljava/math/BigInteger;
9: aload 7
invokeinterface java.security.interfaces.RSAPrivateCrtKey.getPublicExponent:()Ljava/math/BigInteger;
10: aload 7
invokeinterface java.security.interfaces.RSAPrivateCrtKey.getPrivateExponent:()Ljava/math/BigInteger;
11: aload 7
invokeinterface java.security.interfaces.RSAPrivateCrtKey.getPrimeP:()Ljava/math/BigInteger;
12: aload 7
invokeinterface java.security.interfaces.RSAPrivateCrtKey.getPrimeQ:()Ljava/math/BigInteger;
13: aload 7
invokeinterface java.security.interfaces.RSAPrivateCrtKey.getPrimeExponentP:()Ljava/math/BigInteger;
14: aload 7
invokeinterface java.security.interfaces.RSAPrivateCrtKey.getPrimeExponentQ:()Ljava/math/BigInteger;
15: aload 7
invokeinterface java.security.interfaces.RSAPrivateCrtKey.getCrtCoefficient:()Ljava/math/BigInteger;
16: invokespecial org.bouncycastle.asn1.pkcs.RSAPrivateKeyStructure.<init>:(Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;)V
astore 8
start local 8 17: aload 8
invokevirtual org.bouncycastle.asn1.pkcs.RSAPrivateKeyStructure.getEncoded:()[B
astore 6
end local 8 end local 7 18: goto 38
19: StackMap locals: java.lang.String byte[]
StackMap stack:
aload 1
instanceof java.security.interfaces.DSAPrivateKey
ifeq 34
20: ldc "DSA PRIVATE KEY"
astore 5
21: aload 1
checkcast java.security.interfaces.DSAPrivateKey
astore 7
start local 7 22: aload 7
invokeinterface java.security.interfaces.DSAPrivateKey.getParams:()Ljava/security/interfaces/DSAParams;
astore 8
start local 8 23: new org.bouncycastle.asn1.ASN1EncodableVector
dup
invokespecial org.bouncycastle.asn1.ASN1EncodableVector.<init>:()V
astore 9
start local 9 24: aload 9
new org.bouncycastle.asn1.DERInteger
dup
iconst_0
invokespecial org.bouncycastle.asn1.DERInteger.<init>:(I)V
invokevirtual org.bouncycastle.asn1.ASN1EncodableVector.add:(Lorg/bouncycastle/asn1/DEREncodable;)V
25: aload 9
new org.bouncycastle.asn1.DERInteger
dup
aload 8
invokeinterface java.security.interfaces.DSAParams.getP:()Ljava/math/BigInteger;
invokespecial org.bouncycastle.asn1.DERInteger.<init>:(Ljava/math/BigInteger;)V
invokevirtual org.bouncycastle.asn1.ASN1EncodableVector.add:(Lorg/bouncycastle/asn1/DEREncodable;)V
26: aload 9
new org.bouncycastle.asn1.DERInteger
dup
aload 8
invokeinterface java.security.interfaces.DSAParams.getQ:()Ljava/math/BigInteger;
invokespecial org.bouncycastle.asn1.DERInteger.<init>:(Ljava/math/BigInteger;)V
invokevirtual org.bouncycastle.asn1.ASN1EncodableVector.add:(Lorg/bouncycastle/asn1/DEREncodable;)V
27: aload 9
new org.bouncycastle.asn1.DERInteger
dup
aload 8
invokeinterface java.security.interfaces.DSAParams.getG:()Ljava/math/BigInteger;
invokespecial org.bouncycastle.asn1.DERInteger.<init>:(Ljava/math/BigInteger;)V
invokevirtual org.bouncycastle.asn1.ASN1EncodableVector.add:(Lorg/bouncycastle/asn1/DEREncodable;)V
28: aload 7
invokeinterface java.security.interfaces.DSAPrivateKey.getX:()Ljava/math/BigInteger;
astore 10
start local 10 29: aload 8
invokeinterface java.security.interfaces.DSAParams.getG:()Ljava/math/BigInteger;
aload 10
aload 8
invokeinterface java.security.interfaces.DSAParams.getP:()Ljava/math/BigInteger;
invokevirtual java.math.BigInteger.modPow:(Ljava/math/BigInteger;Ljava/math/BigInteger;)Ljava/math/BigInteger;
astore 11
start local 11 30: aload 9
new org.bouncycastle.asn1.DERInteger
dup
aload 11
invokespecial org.bouncycastle.asn1.DERInteger.<init>:(Ljava/math/BigInteger;)V
invokevirtual org.bouncycastle.asn1.ASN1EncodableVector.add:(Lorg/bouncycastle/asn1/DEREncodable;)V
31: aload 9
new org.bouncycastle.asn1.DERInteger
dup
aload 10
invokespecial org.bouncycastle.asn1.DERInteger.<init>:(Ljava/math/BigInteger;)V
invokevirtual org.bouncycastle.asn1.ASN1EncodableVector.add:(Lorg/bouncycastle/asn1/DEREncodable;)V
32: new org.bouncycastle.asn1.DERSequence
dup
aload 9
invokespecial org.bouncycastle.asn1.DERSequence.<init>:(Lorg/bouncycastle/asn1/ASN1EncodableVector;)V
invokevirtual org.bouncycastle.asn1.DERSequence.getEncoded:()[B
astore 6
end local 11 end local 10 end local 9 end local 8 end local 7 33: goto 38
34: StackMap locals:
StackMap stack:
aload 1
instanceof java.security.PrivateKey
ifeq 38
ldc "ECDSA"
aload 1
checkcast java.security.PrivateKey
invokeinterface java.security.PrivateKey.getAlgorithm:()Ljava/lang/String;
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 38
35: ldc "EC PRIVATE KEY"
astore 5
36: aload 1
checkcast java.security.PrivateKey
invokeinterface java.security.PrivateKey.getEncoded:()[B
invokestatic org.bouncycastle.asn1.ASN1Object.fromByteArray:([B)Lorg/bouncycastle/asn1/ASN1Object;
invokestatic org.bouncycastle.asn1.pkcs.PrivateKeyInfo.getInstance:(Ljava/lang/Object;)Lorg/bouncycastle/asn1/pkcs/PrivateKeyInfo;
astore 7
start local 7 37: aload 7
invokevirtual org.bouncycastle.asn1.pkcs.PrivateKeyInfo.getPrivateKey:()Lorg/bouncycastle/asn1/DERObject;
invokevirtual org.bouncycastle.asn1.DERObject.getEncoded:()[B
astore 6
end local 7 38: StackMap locals:
StackMap stack:
aload 5
ifnull 39
aload 6
ifnonnull 40
39: StackMap locals:
StackMap stack:
new java.lang.IllegalArgumentException
dup
new java.lang.StringBuilder
dup
ldc "Object type not supported: "
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;
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
40: StackMap locals:
StackMap stack:
aload 2
invokestatic org.bouncycastle.util.Strings.toUpperCase:(Ljava/lang/String;)Ljava/lang/String;
astore 7
start local 7 41: aload 7
ldc "DESEDE"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 43
42: ldc "DES-EDE3-CBC"
astore 7
43: StackMap locals: java.lang.String
StackMap stack:
aload 7
ldc "AES-"
invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
ifeq 44
bipush 16
goto 45
StackMap locals:
StackMap stack:
44: bipush 8
StackMap locals:
StackMap stack: int
45: istore 8
start local 8 46: iload 8
newarray 8
astore 9
start local 9 47: aload 4
aload 9
invokevirtual java.security.SecureRandom.nextBytes:([B)V
48: iconst_1
aload 0
getfield org.bouncycastle.openssl.MiscPEMGenerator.provider:Ljava/security/Provider;
aload 6
aload 3
aload 7
aload 9
invokestatic org.bouncycastle.openssl.PEMUtilities.crypt:(ZLjava/security/Provider;[B[CLjava/lang/String;[B)[B
astore 10
start local 10 49: new java.util.ArrayList
dup
iconst_2
invokespecial java.util.ArrayList.<init>:(I)V
astore 11
start local 11 50: aload 11
new org.bouncycastle.util.io.pem.PemHeader
dup
ldc "Proc-Type"
ldc "4,ENCRYPTED"
invokespecial org.bouncycastle.util.io.pem.PemHeader.<init>:(Ljava/lang/String;Ljava/lang/String;)V
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
51: aload 11
new org.bouncycastle.util.io.pem.PemHeader
dup
ldc "DEK-Info"
new java.lang.StringBuilder
dup
aload 7
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc ","
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 0
aload 9
invokevirtual org.bouncycastle.openssl.MiscPEMGenerator.getHexEncoded:([B)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.PemHeader.<init>:(Ljava/lang/String;Ljava/lang/String;)V
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
52: new org.bouncycastle.util.io.pem.PemObject
dup
aload 5
aload 11
aload 10
invokespecial org.bouncycastle.util.io.pem.PemObject.<init>:(Ljava/lang/String;Ljava/util/List;[B)V
areturn
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 53 0 this Lorg/bouncycastle/openssl/MiscPEMGenerator;
0 53 1 obj Ljava/lang/Object;
0 53 2 algorithm Ljava/lang/String;
0 53 3 password [C
0 53 4 random Ljava/security/SecureRandom;
3 53 5 type Ljava/lang/String;
4 53 6 keyData [B
7 18 7 k Ljava/security/interfaces/RSAPrivateCrtKey;
17 18 8 keyStruct Lorg/bouncycastle/asn1/pkcs/RSAPrivateKeyStructure;
22 33 7 k Ljava/security/interfaces/DSAPrivateKey;
23 33 8 p Ljava/security/interfaces/DSAParams;
24 33 9 v Lorg/bouncycastle/asn1/ASN1EncodableVector;
29 33 10 x Ljava/math/BigInteger;
30 33 11 y Ljava/math/BigInteger;
37 38 7 privInfo Lorg/bouncycastle/asn1/pkcs/PrivateKeyInfo;
41 53 7 dekAlgName Ljava/lang/String;
46 53 8 ivLength I
47 53 9 iv [B
49 53 10 encData [B
50 53 11 headers Ljava/util/List;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
obj
algorithm
password
random
public org.bouncycastle.util.io.pem.PemObject generate();
descriptor: ()Lorg/bouncycastle/util/io/pem/PemObject;
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=2, args_size=1
start local 0 0: aload 0
getfield org.bouncycastle.openssl.MiscPEMGenerator.algorithm:Ljava/lang/String;
ifnull 3
1: aload 0
aload 0
getfield org.bouncycastle.openssl.MiscPEMGenerator.obj:Ljava/lang/Object;
aload 0
getfield org.bouncycastle.openssl.MiscPEMGenerator.algorithm:Ljava/lang/String;
aload 0
getfield org.bouncycastle.openssl.MiscPEMGenerator.password:[C
aload 0
getfield org.bouncycastle.openssl.MiscPEMGenerator.random:Ljava/security/SecureRandom;
invokevirtual org.bouncycastle.openssl.MiscPEMGenerator.createPemObject:(Ljava/lang/Object;Ljava/lang/String;[CLjava/security/SecureRandom;)Lorg/bouncycastle/util/io/pem/PemObject;
2: areturn
3: StackMap locals:
StackMap stack:
aload 0
aload 0
getfield org.bouncycastle.openssl.MiscPEMGenerator.obj:Ljava/lang/Object;
invokevirtual org.bouncycastle.openssl.MiscPEMGenerator.createPemObject:(Ljava/lang/Object;)Lorg/bouncycastle/util/io/pem/PemObject;
4: areturn
5: StackMap locals:
StackMap stack: java.io.IOException
astore 1
start local 1 6: new org.bouncycastle.util.io.pem.PemGenerationException
dup
new java.lang.StringBuilder
dup
ldc "encoding exception: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual java.io.IOException.getMessage:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
aload 1
invokespecial org.bouncycastle.util.io.pem.PemGenerationException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lorg/bouncycastle/openssl/MiscPEMGenerator;
6 7 1 e Ljava/io/IOException;
Exception table:
from to target type
0 2 5 Class java.io.IOException
3 4 5 Class java.io.IOException
Exceptions:
throws org.bouncycastle.util.io.pem.PemGenerationException
}
SourceFile: "MiscPEMGenerator.java"