Class PKCS8PrivateKeyInfo
- java.lang.Object
-
- org.apache.sshd.common.config.keys.loader.pem.PKCS8PrivateKeyInfo
-
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 }- Author:
- Apache MINA SSHD Project
- See Also:
- RFC 5208 - section 5
-
-
Constructor Summary
Constructors Constructor Description PKCS8PrivateKeyInfo()PKCS8PrivateKeyInfo(byte[] encBytes)PKCS8PrivateKeyInfo(ASN1Object privateKeyInfo)PKCS8PrivateKeyInfo(DERParser parser)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()voiddecode(byte[] encBytes)voiddecode(ASN1Object privateKeyInfo)Decodes the current information with the data from the provided encoding.voiddecode(DERParser parser)List<Integer>getAlgorithmIdentifier()ASN1ObjectgetAlgorithmParameter()ASN1ObjectgetPrivateKeyBytes()BigIntegergetVersion()voidsetAlgorithmIdentifier(List<Integer> algorithmIdentifier)voidsetAlgorithmParameter(ASN1Object algorithmParameter)voidsetPrivateKeyBytes(ASN1Object privateKeyBytes)voidsetVersion(BigInteger version)StringtoString()
-
-
-
Constructor Detail
-
PKCS8PrivateKeyInfo
public PKCS8PrivateKeyInfo()
-
PKCS8PrivateKeyInfo
public PKCS8PrivateKeyInfo(byte[] encBytes) throws IOException- Throws:
IOException
-
PKCS8PrivateKeyInfo
public PKCS8PrivateKeyInfo(DERParser parser) throws IOException
- Throws:
IOException
-
PKCS8PrivateKeyInfo
public PKCS8PrivateKeyInfo(ASN1Object privateKeyInfo) throws IOException
- Throws:
IOException
-
-
Method Detail
-
getVersion
public BigInteger getVersion()
-
setVersion
public void setVersion(BigInteger version)
-
getAlgorithmParameter
public ASN1Object getAlgorithmParameter()
-
setAlgorithmParameter
public void setAlgorithmParameter(ASN1Object algorithmParameter)
-
getPrivateKeyBytes
public ASN1Object getPrivateKeyBytes()
-
setPrivateKeyBytes
public void setPrivateKeyBytes(ASN1Object privateKeyBytes)
-
decode
public void decode(byte[] encBytes) throws IOException- Throws:
IOException
-
decode
public void decode(DERParser parser) throws IOException
- Throws:
IOException
-
decode
public void decode(ASN1Object privateKeyInfo) throws IOException
Decodes the current information with the data from the provided encoding. Note: User shouldclear()the current information before parsing- Parameters:
privateKeyInfo- TheASN1Objectencoding- Throws:
IOException- If failed to parse the encoding
-
clear
public void clear()
-
-