Package org.mozilla.jss.pkix.primitive
Class PrivateKeyInfo
- java.lang.Object
-
- org.mozilla.jss.pkix.primitive.PrivateKeyInfo
-
- All Implemented Interfaces:
java.io.Serializable,java.security.Key,java.security.PrivateKey,javax.security.auth.Destroyable,ASN1Value
public class PrivateKeyInfo extends java.lang.Object implements ASN1Value, java.security.PrivateKey
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPrivateKeyInfo.TemplateA template class for decoding PrivateKeyInfos from BER.
-
Constructor Summary
Constructors Constructor Description PrivateKeyInfo(INTEGER version, AlgorithmIdentifier privateKeyAlgorithm, OCTET_STRING privateKey, SET attributes)Create a PrivateKeyInfo from its components.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidencode(java.io.OutputStream ostream)Write this value's DER encoding to an output stream using its own base tag.voidencode(Tag implicitTag, java.io.OutputStream ostream)Write this value's DER encoding to an output stream using an implicit tag.java.lang.StringgetAlgorithm()SETgetAttributes()May return null if no attributes are present.byte[]getEncoded()java.lang.StringgetFormat()OCTET_STRINGgetPrivateKey()AlgorithmIdentifiergetPrivateKeyAlgorithm()TaggetTag()Returns the base tag for this type, not counting any tags that may be imposed on it by its context.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
-
getVersion
public INTEGER getVersion()
-
getPrivateKeyAlgorithm
public AlgorithmIdentifier getPrivateKeyAlgorithm()
-
getAlgorithm
public java.lang.String getAlgorithm()
- Specified by:
getAlgorithmin interfacejava.security.Key
-
getFormat
public java.lang.String getFormat()
- Specified by:
getFormatin interfacejava.security.Key
-
getEncoded
public byte[] getEncoded()
- Specified by:
getEncodedin interfacejava.security.Key
-
getPrivateKey
public OCTET_STRING getPrivateKey()
-
getAttributes
public SET getAttributes()
May return null if no attributes are present.
-
getTag
public Tag getTag()
Description copied from interface:ASN1ValueReturns the base tag for this type, not counting any tags that may be imposed on it by its context.
-
encode
public void encode(java.io.OutputStream ostream) throws java.io.IOExceptionDescription copied from interface:ASN1ValueWrite this value's DER encoding to an output stream using its own base tag.
-
encode
public void encode(Tag implicitTag, java.io.OutputStream ostream) throws java.io.IOException
Description copied from interface:ASN1ValueWrite this value's DER encoding to an output stream using an implicit tag.
-
getTemplate
public static PrivateKeyInfo.Template getTemplate()
-
-