SshPrivateKey.Generate Method
Namespace: Rebex.Net
Assembly: Rebex.Networking.dll (version 7.0.9119)
Generate()
Generates an SSH private key using the RSA algorithm with a key size of 1024.
Declaration
public static SshPrivateKey Generate()
Returns
Type | Description |
---|---|
SshPrivateKey | SSH private key object. |
Generate(SshHostKeyAlgorithm)
Generates an SSH private key using the specified algorithm and a default key size.
Declaration
public static SshPrivateKey Generate(SshHostKeyAlgorithm algorithm)
Parameters
Type | Name | Description |
---|---|---|
SshHostKeyAlgorithm | algorithm | Key algorithm. |
Returns
Type | Description |
---|---|
SshPrivateKey | SSH private key object. |
Generate(SshHostKeyAlgorithm, Int32)
Generates an SSH private key using the specified algorithm and key size.
Declaration
public static SshPrivateKey Generate(SshHostKeyAlgorithm algorithm, int keySize)
Parameters
Type | Name | Description |
---|---|---|
SshHostKeyAlgorithm | algorithm | Key algorithm. |
Int32 | keySize | Key size. Specify 0 to use default key size. |
Returns
Type | Description |
---|---|
SshPrivateKey | SSH private key object. |