* <p>
* This routine is written to output PKCS1 version 2.1, private keys.
*/
public ASN1Primitive toASN1Primitive()
{
ASN1EncodableVector v = new ASN1EncodableVector();
v.add(new ASN1Integer(version)); // version
v.add(new ASN1Integer(getModulus()));
v.add(new ASN1Integer(getPublicExponent()));
v.add(new ASN1Integer(getPrivateExponent()));
v.add(new ASN1Integer(getPrime1()));
v.add(new ASN1Integer(getPrime2()));
v.add(new ASN1Integer(getExponent1()));
v.add(new ASN1Integer(getExponent2()));
v.add(new ASN1Integer(getCoefficient()));
if (otherPrimeInfos != null)
{
v.add(otherPrimeInfos);
}
return new DERSequence(v);
}