Package org.mozilla.jss.pkix.primitive
Class PrivateKeyInfo
java.lang.Object
org.mozilla.jss.pkix.primitive.PrivateKeyInfo
- All Implemented Interfaces:
Serializable,Key,PrivateKey,Destroyable,ASN1Value
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA template class for decoding PrivateKeyInfos from BER. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate SETprivate OCTET_STRINGprivate AlgorithmIdentifierprivate SEQUENCEprivate static final longprivate static final Tagprivate static final PrivateKeyInfo.Templateprivate INTEGER -
Constructor Summary
ConstructorsConstructorDescriptionPrivateKeyInfo(INTEGER version, AlgorithmIdentifier privateKeyAlgorithm, OCTET_STRING privateKey, SET attributes) Create a PrivateKeyInfo from its components. -
Method Summary
Modifier and TypeMethodDescriptionvoidencode(OutputStream ostream) Write this value's DER encoding to an output stream using its own base tag.voidencode(Tag implicitTag, OutputStream ostream) Write this value's DER encoding to an output stream using an implicit tag.May return null if no attributes are present.byte[]getTag()Returns the base tag for this type, not counting any tags that may be imposed on it by its context.static PrivateKeyInfo.TemplateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javax.security.auth.Destroyable
destroy, isDestroyed
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
version
-
privateKeyAlgorithm
-
privateKey
-
attributes
-
sequence
-
TAG
-
templateInstance
-
-
Constructor Details
-
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 Details
-
getVersion
-
getPrivateKeyAlgorithm
-
getAlgorithm
- Specified by:
getAlgorithmin interfaceKey
-
getFormat
-
getEncoded
public byte[] getEncoded()- Specified by:
getEncodedin interfaceKey
-
getPrivateKey
-
getAttributes
May return null if no attributes are present. -
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
Description copied from interface:ASN1ValueWrite this value's DER encoding to an output stream using its own base tag.- Specified by:
encodein interfaceASN1Value- Parameters:
ostream- Output stream.- Throws:
IOException- If an error occurred.
-
encode
Description copied from interface:ASN1ValueWrite this value's DER encoding to an output stream using an implicit tag.- Specified by:
encodein interfaceASN1Value- Parameters:
implicitTag- Implicit tag.ostream- Output stream.- Throws:
IOException- If an error occurred.
-
getTemplate
-