public class PKCS8PrivateKeyInfo extends 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
}
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) |
List<Integer> |
getAlgorithmIdentifier() |
ASN1Object |
getAlgorithmParameter() |
ASN1Object |
getPrivateKeyBytes() |
BigInteger |
getVersion() |
void |
setAlgorithmIdentifier(List<Integer> algorithmIdentifier) |
void |
setAlgorithmParameter(ASN1Object algorithmParameter) |
void |
setPrivateKeyBytes(ASN1Object privateKeyBytes) |
void |
setVersion(BigInteger version) |
String |
toString() |
public PKCS8PrivateKeyInfo()
public PKCS8PrivateKeyInfo(byte[] encBytes) throws IOException
IOException
public PKCS8PrivateKeyInfo(DERParser parser) throws IOException
IOException
public PKCS8PrivateKeyInfo(ASN1Object privateKeyInfo) throws IOException
IOException
public BigInteger getVersion()
public void setVersion(BigInteger version)
public ASN1Object getAlgorithmParameter()
public void setAlgorithmParameter(ASN1Object algorithmParameter)
public ASN1Object getPrivateKeyBytes()
public void setPrivateKeyBytes(ASN1Object privateKeyBytes)
public void decode(byte[] encBytes) throws IOException
IOException
public void decode(DERParser parser) throws IOException
IOException
public void decode(ASN1Object privateKeyInfo) throws IOException
clear()
the current information before parsingprivateKeyInfo
- The ASN1Object
encodingIOException
- If failed to parse the encodingpublic void clear()
Copyright © 2008–2024 The Apache Software Foundation. All rights reserved.