public class PKCS8PrivateKeyInfo
extends java.lang.Object
PrivateKeyInfo ::= SEQUENCE {
version Version,
privateKeyAlgorithm PrivateKeyAlgorithmIdentifier,
privateKey PrivateKey,
attributes [0] IMPLICIT Attributes OPTIONAL
}
Version ::= INTEGER
PrivateKeyAlgorithmIdentifier ::= AlgorithmIdentifier
PrivateKey ::= OCTET STRING
Attributes ::= SET OF Attribute
AlgorithmIdentifier ::= SEQUENCE {
algorithm OBJECT IDENTIFIER,
parameters ANY DEFINED BY algorithm OPTIONAL
}
Modifier and Type | Field and Description |
---|---|
private java.util.List<java.lang.Integer> |
algorithmIdentifier |
private ASN1Object |
algorithmParameter |
private ASN1Object |
privateKeyBytes |
private java.math.BigInteger |
version |
Constructor and Description |
---|
PKCS8PrivateKeyInfo() |
PKCS8PrivateKeyInfo(ASN1Object privateKeyInfo) |
PKCS8PrivateKeyInfo(byte[] encBytes) |
PKCS8PrivateKeyInfo(DERParser parser) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
void |
decode(ASN1Object privateKeyInfo)
Decodes the current information with the data from the provided encoding.
|
void |
decode(byte[] encBytes) |
void |
decode(DERParser parser) |
java.util.List<java.lang.Integer> |
getAlgorithmIdentifier() |
ASN1Object |
getAlgorithmParameter() |
ASN1Object |
getPrivateKeyBytes() |
java.math.BigInteger |
getVersion() |
void |
setAlgorithmIdentifier(java.util.List<java.lang.Integer> algorithmIdentifier) |
void |
setAlgorithmParameter(ASN1Object algorithmParameter) |
void |
setPrivateKeyBytes(ASN1Object privateKeyBytes) |
void |
setVersion(java.math.BigInteger version) |
java.lang.String |
toString() |
private java.math.BigInteger version
private java.util.List<java.lang.Integer> algorithmIdentifier
private ASN1Object algorithmParameter
private ASN1Object privateKeyBytes
public PKCS8PrivateKeyInfo()
public PKCS8PrivateKeyInfo(byte[] encBytes) throws java.io.IOException
java.io.IOException
public PKCS8PrivateKeyInfo(DERParser parser) throws java.io.IOException
java.io.IOException
public PKCS8PrivateKeyInfo(ASN1Object privateKeyInfo) throws java.io.IOException
java.io.IOException
public java.math.BigInteger getVersion()
public void setVersion(java.math.BigInteger version)
public java.util.List<java.lang.Integer> getAlgorithmIdentifier()
public void setAlgorithmIdentifier(java.util.List<java.lang.Integer> algorithmIdentifier)
public ASN1Object getAlgorithmParameter()
public void setAlgorithmParameter(ASN1Object algorithmParameter)
public ASN1Object getPrivateKeyBytes()
public void setPrivateKeyBytes(ASN1Object privateKeyBytes)
public void decode(byte[] encBytes) throws java.io.IOException
java.io.IOException
public void decode(DERParser parser) throws java.io.IOException
java.io.IOException
public void decode(ASN1Object privateKeyInfo) throws java.io.IOException
clear()
the current information before parsingprivateKeyInfo
- The ASN1Object
encodingjava.io.IOException
- If failed to parse the encodingpublic void clear()
public java.lang.String toString()
toString
in class java.lang.Object