org.mozilla.jss.pkix.primitive
Class SubjectPublicKeyInfo
java.security.spec.X509EncodedKeySpec
org.mozilla.jss.pkix.primitive.SubjectPublicKeyInfo
- ASN1Value, java.security.PublicKey
public class SubjectPublicKeyInfo
extends java.security.spec.X509EncodedKeySpec
implements ASN1Value, java.security.PublicKey
A SubjectPublicKeyInfo, which stores information about a public key.
This class implements java.security.PublicKey
.
TAG
public static final Tag TAG
SubjectPublicKeyInfo
public SubjectPublicKeyInfo(PublicKey pubk)
throws InvalidBERException,
IOException
encode
public void encode(OutputStream ostream)
throws IOException
Write this value's DER encoding to an output stream using
its own base tag.
- encode in interface ASN1Value
encode
public void encode(Tag implicit,
OutputStream ostream)
throws IOException
Write this value's DER encoding to an output stream using
an implicit tag.
- encode in interface ASN1Value
getAlgorithm
public String getAlgorithm()
getEncoded
public byte[] getEncoded()
getSubjectPublicKey
public BIT_STRING getSubjectPublicKey()
getTag
public Tag getTag()
Returns the base tag for this type, not counting any tags
that may be imposed on it by its context.
- getTag in interface ASN1Value
toPublicKey
public PublicKey toPublicKey()
throws NoSuchAlgorithmException,
InvalidKeyFormatException
Creates a PublicKey from the public key information. Currently
only RSA and DSA keys can be converted.