org.bouncycastle.asn1.x509

Class RSAPublicKeyStructure

Implemented Interfaces:
DEREncodable

public class RSAPublicKeyStructure
extends ASN1Encodable

Field Summary

Fields inherited from class org.bouncycastle.asn1.ASN1Encodable

BER, DER

Constructor Summary

RSAPublicKeyStructure(BigInteger modulus, BigInteger publicExponent)
RSAPublicKeyStructure(ASN1Sequence seq)

Method Summary

static RSAPublicKeyStructure
getInstance(Object obj)
static RSAPublicKeyStructure
getInstance(ASN1TaggedObject obj, boolean explicit)
BigInteger
getModulus()
BigInteger
getPublicExponent()
DERObject
toASN1Object()
This outputs the key in PKCS1v2 format.

Methods inherited from class org.bouncycastle.asn1.ASN1Encodable

equals, getDEREncoded, getDERObject, getEncoded, getEncoded, hashCode, toASN1Object

Constructor Details

RSAPublicKeyStructure

public RSAPublicKeyStructure(BigInteger modulus,
                             BigInteger publicExponent)

RSAPublicKeyStructure

public RSAPublicKeyStructure(ASN1Sequence seq)

Method Details

getInstance

public static RSAPublicKeyStructure getInstance(Object obj)

getInstance

public static RSAPublicKeyStructure getInstance(ASN1TaggedObject obj,
                                                boolean explicit)

getModulus

public BigInteger getModulus()

getPublicExponent

public BigInteger getPublicExponent()

toASN1Object

public DERObject toASN1Object()
This outputs the key in PKCS1v2 format.
      RSAPublicKey ::= SEQUENCE {
                          modulus INTEGER, -- n
                          publicExponent INTEGER, -- e
                      }
 

Overrides:
toASN1Object in interface ASN1Encodable