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
ConstructorsConstructorDescriptionDeprecated.use SubjectPublicKeyInfo.getInstance()SubjectPublicKeyInfo
(AlgorithmIdentifier algId, byte[] publicKey) SubjectPublicKeyInfo
(AlgorithmIdentifier algId, ASN1BitString publicKey) SubjectPublicKeyInfo
(AlgorithmIdentifier algId, ASN1Encodable publicKey) -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.use getAlgorithm()static SubjectPublicKeyInfo
getInstance
(Object obj) static SubjectPublicKeyInfo
getInstance
(ASN1TaggedObject obj, boolean explicit) Deprecated.use parsePublicKeyfor 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
-
SubjectPublicKeyInfo
- Throws:
IOException
-
SubjectPublicKeyInfo
-
SubjectPublicKeyInfo
Deprecated.use SubjectPublicKeyInfo.getInstance()
-
-
Method Details
-
getInstance
-
getInstance
-
getAlgorithm
-
getAlgorithmId
Deprecated.use getAlgorithm()- Returns:
- alg ID.
-
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.
-
getPublicKey
Deprecated.use parsePublicKeyfor 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.
-