org.mozilla.jss.pkix.primitive
Class PrivateKeyInfo
java.lang.Object
|
+--org.mozilla.jss.pkix.primitive.PrivateKeyInfo
- public class PrivateKeyInfo
- extends java.lang.Object
- implements ASN1Value, java.security.PrivateKey
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
version
private INTEGER version
privateKeyAlgorithm
private AlgorithmIdentifier privateKeyAlgorithm
privateKey
private OCTET_STRING privateKey
attributes
private SET attributes
sequence
private SEQUENCE sequence
TAG
private static final Tag TAG
templateInstance
private static final PrivateKeyInfo.Template templateInstance
PrivateKeyInfo
private PrivateKeyInfo()
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.
getVersion
public INTEGER getVersion()
getPrivateKeyAlgorithm
public AlgorithmIdentifier getPrivateKeyAlgorithm()
getAlgorithm
public java.lang.String getAlgorithm()
getFormat
public java.lang.String getFormat()
getEncoded
public byte[] getEncoded()
getPrivateKey
public OCTET_STRING getPrivateKey()
getAttributes
public SET getAttributes()
- May return null if no attributes are present.
getTag
public Tag getTag()
- Specified by:
- getTag in interface ASN1Value
encode
public void encode(java.io.OutputStream ostream)
throws java.io.IOException
- Specified by:
- encode in interface ASN1Value
encode
public void encode(Tag implicitTag,
java.io.OutputStream ostream)
throws java.io.IOException
- Specified by:
- encode in interface ASN1Value
getTemplate
public static PrivateKeyInfo.Template getTemplate()