Method FromECDsa
- Namespace
- SshSharp
- Assembly
- SshSharp.dll
FromECDsa(ECDsa, string?)
A key that .NET's ECDsa holds, on P-256, P-384 or P-521, used without exporting it, as FromRsa(RSA, string?) does for RSA.
public static SshPrivateKey FromECDsa(ECDsa ecdsa, string? comment = null)
Parameters
ecdsaECDsaThe key. It stays the caller's: disposing the returned key does not dispose it.
commentstringA comment for the key, often
user@host.
Returns
Remarks
The returned key cannot be exported or added to an agent.
Exceptions
- ArgumentException
The key is not on one of the NIST curves SSH uses.