The SshPrivateKey type exposes the following members.
Constructors
Name | Description | |
---|---|---|
![]() ![]() | SshPrivateKey(AsymmetricAlgorithm) |
Creates an SSH private key based on the specified RSA or DSA object.
|
![]() ![]() | SshPrivateKey(Certificate) |
Creates a certificate-based SSH key for use with SSH/SFTP servers that support X.509 certificate authentication.
|
![]() ![]() | SshPrivateKey(CertificateChain) |
Creates a certificate-based SSH key for use with SSH/SFTP client that support X.509 certificate authentication.
|
![]() ![]() | SshPrivateKey(array<Byte>[]()[][], String) |
Loads a PKCS #8 or SSLeay-format RSA or DSA private key from the specified raw data.
|
![]() ![]() | SshPrivateKey(Stream, String) |
Loads a PKCS #8 or SSLeay-format RSA or DSA private key from the specified stream.
|
![]() ![]() | SshPrivateKey(String, String) |
Loads a PKCS #8 or SSLeay-format RSA or DSA private key from the specified path.
|
Methods
Name | Description | |
---|---|---|
![]() ![]() ![]() | CreateFrom(DSAParameters) |
Creates an SSH private key from the specified DSA parameters.
|
![]() ![]() ![]() | CreateFrom(RSAParameters) |
Creates an SSH private key from the specified RSA parameters.
|
![]() ![]() | CreateSignature | Obsolete. |
![]() ![]() | Equals(Object) |
Determines whether the specified object is the same key as the specified key.
(Inherited from SshPublicKey.) |
![]() ![]() | Equals(SshPublicKey) |
Determines whether the specified key is the same key as the specified key.
(Inherited from SshPublicKey.) |
![]() ![]() | Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) |
![]() ![]() ![]() | Generate()()()() |
Generates an SSH private key using the RSA algorithm with a key size of 1024.
|
![]() ![]() ![]() | Generate(SshHostKeyAlgorithm) |
Generates an SSH private key using the specified algorithm and a default key size.
|
![]() ![]() ![]() | Generate(SshHostKeyAlgorithm, Int32) |
Generates an SSH private key using the specified algorithm and key size.
|
![]() ![]() | GetCertificate |
Returns the underlying X509 certificate.
(Inherited from SshPublicKey.) |
![]() ![]() | GetCertificateChain |
Returns the underlying X509 certificate and its chain (for certificate-based keys).
(Inherited from SshPublicKey.) |
![]() ![]() | GetDSAParameters |
Gets the DSA parameters for a DSA key. May only be used for DSA private keys.
|
![]() ![]() | GetHashCode |
A hash function for this type.
(Inherited from SshPublicKey.) |
![]() ![]() | GetPrivateKey |
Gets the raw form of the private key.
|
![]() ![]() | GetPrivateKeyInfo |
Returns the private key info for this key.
|
![]() ![]() | GetPublicKey |
Gets the public key in SSH format (or raw X.509 data of the leaf certificate).
(Inherited from SshPublicKey.) |
![]() ![]() | GetPublicKeyInfo |
Returns the public key info for this key.
(Inherited from SshPublicKey.) |
![]() ![]() | GetRSAParameters |
Gets the RSA parameters for a RSA key. May only be used for RSA private keys.
|
![]() ![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() ![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() ![]() | Save(Stream, String, SshPrivateKeyFormat) |
Saves the private key into the supplied stream in the specified format.
|
![]() ![]() | Save(Stream, String, Object) | Obsolete. |
![]() ![]() | Save(String, String, SshPrivateKeyFormat) |
Saves the private key into the supplied stream in the specified format.
|
![]() ![]() | Save(String, String, Object) | Obsolete. |
![]() ![]() | SavePublicKey(Stream) |
Saves the public key into the supplied stream in Base64-encoded SSH2 public key format.
(Inherited from SshPublicKey.) |
![]() ![]() | SavePublicKey(String) |
Saves the public key into the supplied stream in Base64-encoded SSH2 public key format.
(Inherited from SshPublicKey.) |
![]() ![]() | SavePublicKey(Stream, SshPublicKeyFormat) |
Saves the public key into the supplied stream in the specified format.
(Inherited from SshPublicKey.) |
![]() ![]() | SavePublicKey(String, SshPublicKeyFormat) |
Saves the public key into the supplied stream in the specified format.
(Inherited from SshPublicKey.) |
![]() ![]() | ToString | Returns a String that represents the current Object. (Inherited from Object.) |
![]() ![]() | VerifySignature | Obsolete. (Inherited from SshPublicKey.) |
Properties
Name | Description | |
---|---|---|
![]() ![]() | Certificate |
Gets a certificate of a certificate-based SSH key.
|
![]() ![]() | Comment |
Gets or sets the key comment. The comment is used while saving in some formats.
(Inherited from SshPublicKey.) |
![]() ![]() | Fingerprint |
Gets the public key fingerprint.
(Inherited from SshPublicKey.) |
![]() ![]() | KeyAlgorithm |
Gets the key algorithm.
(Inherited from SshPublicKey.) |
![]() ![]() | KeyAlgorithmId |
Gets the key algorithm ID
(Inherited from SshPublicKey.) |
![]() ![]() | KeySize |
Gets the key size, in bits.
(Inherited from SshPublicKey.) |