Package org.bouncycastle.asn1.x509
Class SubjectPublicKeyInfo
java.lang.Object
org.bouncycastle.asn1.ASN1Object
org.bouncycastle.asn1.x509.SubjectPublicKeyInfo
- All Implemented Interfaces:
ASN1Encodable
,Encodable
The object that contains the public key stored in a certificate.
The getEncoded() method in the public keys in the JCE produces a DER encoded one of these.
-
Constructor Summary
ConstructorsConstructorDescriptionSubjectPublicKeyInfo
(AlgorithmIdentifier algId, byte[] publicKey) SubjectPublicKeyInfo
(AlgorithmIdentifier algId, ASN1Encodable publicKey) -
Method Summary
Modifier and TypeMethodDescriptionstatic SubjectPublicKeyInfo
getInstance
(Object obj) static SubjectPublicKeyInfo
getInstance
(ASN1TaggedObject obj, boolean explicit) for when the public key is raw bits.for when the public key is an encoded object - if the bitstring can't be decoded this routine throws an IOException.Produce an object suitable for an ASN1OutputStream.Methods inherited from class org.bouncycastle.asn1.ASN1Object
encodeTo, encodeTo, equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode
-
Constructor Details
-
SubjectPublicKeyInfo
- Throws:
IOException
-
SubjectPublicKeyInfo
-
-
Method Details
-
getInstance
-
getInstance
-
getAlgorithm
-
parsePublicKey
for when the public key is an encoded object - if the bitstring can't be decoded this routine throws an IOException.- Returns:
- the public key as an ASN.1 primitive.
- Throws:
IOException
- - if the bit string doesn't represent a DER encoded object.
-
getPublicKeyData
for when the public key is raw bits.- Returns:
- the public key as the raw bit string...
-
toASN1Primitive
Produce an object suitable for an ASN1OutputStream.SubjectPublicKeyInfo ::= SEQUENCE { algorithm AlgorithmIdentifier, publicKey BIT STRING }
- Specified by:
toASN1Primitive
in interfaceASN1Encodable
- Specified by:
toASN1Primitive
in classASN1Object
- Returns:
- a primitive representation of this object.
-