org.mozilla.jss.pkix.primitive

Class PrivateKeyInfo

public class PrivateKeyInfo extends Object implements ASN1Value, PrivateKey

Nested Class Summary
static classPrivateKeyInfo.Template
A template class for decoding PrivateKeyInfos from BER.
Constructor Summary
PrivateKeyInfo(INTEGER version, AlgorithmIdentifier privateKeyAlgorithm, OCTET_STRING privateKey, SET attributes)
Create a PrivateKeyInfo from its components.
Method Summary
voidencode(OutputStream ostream)
voidencode(Tag implicitTag, OutputStream ostream)
StringgetAlgorithm()
SETgetAttributes()
May return null if no attributes are present.
byte[]getEncoded()
StringgetFormat()
OCTET_STRINGgetPrivateKey()
AlgorithmIdentifiergetPrivateKeyAlgorithm()
TaggetTag()
static PrivateKeyInfo.TemplategetTemplate()
INTEGERgetVersion()

Constructor Detail

PrivateKeyInfo

public PrivateKeyInfo(INTEGER version, AlgorithmIdentifier privateKeyAlgorithm, OCTET_STRING privateKey, SET attributes)
Create a PrivateKeyInfo from its components.

Parameters: attributes May be null if there are no attributes, in which case the attributes field will be omitted from the DER encoding. Each element must be a org.mozilla.jss.pkix.primitive.Attribute.

Method Detail

encode

public void encode(OutputStream ostream)

encode

public void encode(Tag implicitTag, OutputStream ostream)

getAlgorithm

public String getAlgorithm()

getAttributes

public SET getAttributes()
May return null if no attributes are present.

getEncoded

public byte[] getEncoded()

getFormat

public String getFormat()

getPrivateKey

public OCTET_STRING getPrivateKey()

getPrivateKeyAlgorithm

public AlgorithmIdentifier getPrivateKeyAlgorithm()

getTag

public Tag getTag()

getTemplate

public static PrivateKeyInfo.Template getTemplate()

getVersion

public INTEGER getVersion()