public class

SubjectPublicKeyInfo

extends ASN1Encodable
java.lang.Object
   ↳ org.bouncycastle.asn1.ASN1Encodable
     ↳ org.bouncycastle.asn1.x509.SubjectPublicKeyInfo

Class Overview

The object that contains the public key stored in a certficate.

The getEncoded() method in the public keys in the JCE produces a DER encoded one of these.

Summary

[Expand]
Inherited Constants
From class org.bouncycastle.asn1.ASN1Encodable
Public Constructors
SubjectPublicKeyInfo(AlgorithmIdentifier algId, DEREncodable publicKey)
SubjectPublicKeyInfo(AlgorithmIdentifier algId, byte[] publicKey)
SubjectPublicKeyInfo(ASN1Sequence seq)
Public Methods
AlgorithmIdentifier getAlgorithmId()
static SubjectPublicKeyInfo getInstance(ASN1TaggedObject obj, boolean explicit)
static SubjectPublicKeyInfo getInstance(Object obj)
DERObject getPublicKey()
for when the public key is an encoded object - if the bitstring can't be decoded this routine throws an IOException.
DERBitString getPublicKeyData()
for when the public key is raw bits...
DERObject toASN1Object()
Produce an object suitable for an ASN1OutputStream.
[Expand]
Inherited Methods
From class org.bouncycastle.asn1.ASN1Encodable
From class java.lang.Object
From interface org.bouncycastle.asn1.DEREncodable

Public Constructors

public SubjectPublicKeyInfo (AlgorithmIdentifier algId, DEREncodable publicKey)

public SubjectPublicKeyInfo (AlgorithmIdentifier algId, byte[] publicKey)

public SubjectPublicKeyInfo (ASN1Sequence seq)

Public Methods

public AlgorithmIdentifier getAlgorithmId ()

public static SubjectPublicKeyInfo getInstance (ASN1TaggedObject obj, boolean explicit)

public static SubjectPublicKeyInfo getInstance (Object obj)

public DERObject getPublicKey ()

for when the public key is an encoded object - if the bitstring can't be decoded this routine throws an IOException.

Throws
IOException - if the bit string doesn't represent a DER encoded object.

public DERBitString getPublicKeyData ()

for when the public key is raw bits...

public DERObject toASN1Object ()

Produce an object suitable for an ASN1OutputStream.

 SubjectPublicKeyInfo ::= SEQUENCE {
                          algorithm AlgorithmIdentifier,
                          publicKey BIT STRING }