Class PKCS8PrivateKeyInfo
java.lang.Object
org.apache.sshd.common.config.keys.loader.pem.PKCS8PrivateKeyInfo
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
}
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPKCS8PrivateKeyInfo(byte[] encBytes) PKCS8PrivateKeyInfo(ASN1Object privateKeyInfo) PKCS8PrivateKeyInfo(DERParser parser) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()voiddecode(byte[] encBytes) voiddecode(ASN1Object privateKeyInfo) Decodes the current information with the data from the provided encoding.voidvoidsetAlgorithmIdentifier(List<Integer> algorithmIdentifier) voidsetAlgorithmParameter(ASN1Object algorithmParameter) voidsetPrivateKeyBytes(ASN1Object privateKeyBytes) voidsetVersion(BigInteger version) toString()
-
Field Details
-
version
-
algorithmIdentifier
-
algorithmParameter
-
privateKeyBytes
-
-
Constructor Details
-
PKCS8PrivateKeyInfo
public PKCS8PrivateKeyInfo() -
PKCS8PrivateKeyInfo
- Throws:
IOException
-
PKCS8PrivateKeyInfo
- Throws:
IOException
-
PKCS8PrivateKeyInfo
- Throws:
IOException
-
-
Method Details
-
getVersion
-
setVersion
-
getAlgorithmIdentifier
-
setAlgorithmIdentifier
-
getAlgorithmParameter
-
setAlgorithmParameter
-
getPrivateKeyBytes
-
setPrivateKeyBytes
-
decode
- Throws:
IOException
-
decode
- Throws:
IOException
-
decode
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() -
toString
-