Top Description Fields Constructors Methods
org.apache.sshd.common.config.keys.loader.pem

public Class PKCS8PrivateKeyInfo

extends Object
Class Inheritance
Imports
java.io.IOException, .StreamCorruptedException, java.math.BigInteger, java.util.List, org.apache.sshd.common.util.io.der.ASN1Object, .ASN1Type, .DERParser


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

Field Summary

Modifier and TypeField and Description
private List<Integer>
private ASN1Object
private ASN1Object
private BigInteger

Constructor Summary

AccessConstructor and Description
public
public
PKCS8PrivateKeyInfo(byte[] encBytes)

public
public

Method Summary

Modifier and TypeMethod and Description
public void
public void
decode(byte[] encBytes)

public void
decode(DERParser parser)

public void
decode(ASN1Object
The ASN1Object encoding
privateKeyInfo
)

Decodes the current information with the data from the provided encoding

Note

User should clear() the current information before parsing

public List<Integer>
public ASN1Object
public ASN1Object
public BigInteger
public void
setAlgorithmIdentifier(List<Integer> algorithmIdentifier)

public void
setAlgorithmParameter(ASN1Object algorithmParameter)

public void
setPrivateKeyBytes(ASN1Object privateKeyBytes)

public void
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

algorithmIdentifierback to summary
private List<Integer> algorithmIdentifier
algorithmParameterback to summary
private ASN1Object algorithmParameter
privateKeyBytesback to summary
private ASN1Object privateKeyBytes
versionback to summary
private BigInteger version

Constructor Detail

PKCS8PrivateKeyInfoback to summary
public PKCS8PrivateKeyInfo()
PKCS8PrivateKeyInfoback to summary
public PKCS8PrivateKeyInfo(byte[] encBytes) throws IOException
PKCS8PrivateKeyInfoback to summary
public PKCS8PrivateKeyInfo(DERParser parser) throws IOException
PKCS8PrivateKeyInfoback to summary
public PKCS8PrivateKeyInfo(ASN1Object privateKeyInfo) throws IOException

Method Detail

clearback to summary
public void clear()
decodeback to summary
public void decode(byte[] encBytes) throws IOException
decodeback to summary
public void decode(DERParser parser) throws IOException
decodeback to summary
public void decode(ASN1Object privateKeyInfo) throws IOException

Decodes the current information with the data from the provided encoding

Note

User should clear() the current information before parsing

Parameters
privateKeyInfo:ASN1Object

The ASN1Object encoding

Exceptions
IOException:
If failed to parse the encoding
getAlgorithmIdentifierback to summary
public List<Integer> getAlgorithmIdentifier()
getAlgorithmParameterback to summary
public ASN1Object getAlgorithmParameter()
getPrivateKeyBytesback to summary
public ASN1Object getPrivateKeyBytes()
getVersionback to summary
public BigInteger getVersion()
setAlgorithmIdentifierback to summary
public void setAlgorithmIdentifier(List<Integer> algorithmIdentifier)
setAlgorithmParameterback to summary
public void setAlgorithmParameter(ASN1Object algorithmParameter)
setPrivateKeyBytesback to summary
public void setPrivateKeyBytes(ASN1Object privateKeyBytes)
setVersionback to summary
public void setVersion(BigInteger version)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override