Class SubjectPublicKeyInfo
-
- All Implemented Interfaces:
-
io.anyline.nfc.bouncycastle.asn1.ASN1Encodable
,io.anyline.nfc.bouncycastle.util.Encodable
public class SubjectPublicKeyInfo extends ASN1Object
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
Constructors Constructor Description SubjectPublicKeyInfo(AlgorithmIdentifier algId, ASN1Encodable publicKey)
SubjectPublicKeyInfo(AlgorithmIdentifier algId, Array<byte> publicKey)
SubjectPublicKeyInfo(ASN1Sequence seq)
-
Method Summary
Modifier and Type Method Description static SubjectPublicKeyInfo
getInstance(ASN1TaggedObject obj, boolean explicit)
static SubjectPublicKeyInfo
getInstance(Object obj)
AlgorithmIdentifier
getAlgorithm()
AlgorithmIdentifier
getAlgorithmId()
ASN1Primitive
parsePublicKey()
for when the public key is an encoded object - if the bitstring can't be decoded this routine throws an IOException. ASN1Primitive
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. ASN1Primitive
toASN1Primitive()
Produce an object suitable for an ASN1OutputStream. -
-
Constructor Detail
-
SubjectPublicKeyInfo
SubjectPublicKeyInfo(AlgorithmIdentifier algId, ASN1Encodable publicKey)
-
SubjectPublicKeyInfo
SubjectPublicKeyInfo(AlgorithmIdentifier algId, Array<byte> publicKey)
-
SubjectPublicKeyInfo
SubjectPublicKeyInfo(ASN1Sequence seq)
-
-
Method Detail
-
getInstance
static SubjectPublicKeyInfo getInstance(ASN1TaggedObject obj, boolean explicit)
-
getInstance
static SubjectPublicKeyInfo getInstance(Object obj)
-
getAlgorithm
AlgorithmIdentifier getAlgorithm()
-
getAlgorithmId
AlgorithmIdentifier getAlgorithmId()
- Returns:
alg ID.
-
parsePublicKey
ASN1Primitive 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.
-
getPublicKey
ASN1Primitive getPublicKey()
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.
-
getPublicKeyData
DERBitString getPublicKeyData()
for when the public key is raw bits.
- Returns:
the public key as the raw bit string...
-
toASN1Primitive
ASN1Primitive toASN1Primitive()
Produce an object suitable for an ASN1OutputStream.
SubjectPublicKeyInfo ::= SEQUENCE { algorithm AlgorithmIdentifier, publicKey BIT STRING }
-
-
-
-