ASN1Encodable
, Encodable
public class SubjectPublicKeyInfo extends ASN1Object
The getEncoded() method in the public keys in the JCE produces a DER encoded one of these.
Constructor | Description |
---|---|
SubjectPublicKeyInfo(ASN1Sequence seq) |
Deprecated.
use SubjectPublicKeyInfo.getInstance()
|
SubjectPublicKeyInfo(AlgorithmIdentifier algId,
byte[] publicKey) |
|
SubjectPublicKeyInfo(AlgorithmIdentifier algId,
ASN1Encodable publicKey) |
Modifier and Type | Method | Description |
---|---|---|
AlgorithmIdentifier |
getAlgorithm() |
|
AlgorithmIdentifier |
getAlgorithmId() |
Deprecated.
use getAlgorithm()
|
static SubjectPublicKeyInfo |
getInstance(java.lang.Object obj) |
|
static SubjectPublicKeyInfo |
getInstance(ASN1TaggedObject obj,
boolean explicit) |
|
ASN1Primitive |
getPublicKey() |
Deprecated.
use parsePublicKey
|
DERBitString |
getPublicKeyData() |
for when the public key is raw bits.
|
ASN1Primitive |
parsePublicKey() |
for when the public key is an encoded object - if the bitstring
can't be decoded this routine throws an IOException.
|
ASN1Primitive |
toASN1Primitive() |
Produce an object suitable for an ASN1OutputStream.
|
equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode, toASN1Object
public SubjectPublicKeyInfo(AlgorithmIdentifier algId, ASN1Encodable publicKey) throws java.io.IOException
java.io.IOException
public SubjectPublicKeyInfo(AlgorithmIdentifier algId, byte[] publicKey)
public SubjectPublicKeyInfo(ASN1Sequence seq)
public static SubjectPublicKeyInfo getInstance(ASN1TaggedObject obj, boolean explicit)
public static SubjectPublicKeyInfo getInstance(java.lang.Object obj)
public AlgorithmIdentifier getAlgorithm()
public AlgorithmIdentifier getAlgorithmId()
public ASN1Primitive parsePublicKey() throws java.io.IOException
java.io.IOException
- - if the bit string doesn't represent a DER
encoded object.public ASN1Primitive getPublicKey() throws java.io.IOException
java.io.IOException
- - if the bit string doesn't represent a DER
encoded object.public DERBitString getPublicKeyData()
public ASN1Primitive toASN1Primitive()
SubjectPublicKeyInfo ::= SEQUENCE { algorithm AlgorithmIdentifier, publicKey BIT STRING }
toASN1Primitive
in interface ASN1Encodable
toASN1Primitive
in class ASN1Object