Class EcdsaKey
Contains ECDSA (ecdsa-sha2-nistp{256,384,521}) private and public key.
public class EcdsaKey : Key, IDisposable
- Inheritance
-
EcdsaKey
- Implements
- Inherited Members
Constructors
EcdsaKey(SshKeyData)
Initializes a new instance of the EcdsaKey class.
public EcdsaKey(SshKeyData publicKeyData)
Parameters
publicKeyData
SshKeyDataThe encoded public key data.
EcdsaKey(byte[])
Initializes a new instance of the EcdsaKey class.
public EcdsaKey(byte[] data)
Parameters
data
byte[]DER encoded private key data.
EcdsaKey(string, byte[], byte[])
Initializes a new instance of the EcdsaKey class.
public EcdsaKey(string curve, byte[] publickey, byte[] privatekey)
Parameters
curve
stringThe curve name.
publickey
byte[]Value of publickey.
privatekey
byte[]Value of privatekey.
Properties
DigitalSignature
Gets the digital signature.
protected override DigitalSignature DigitalSignature { get; }
Property Value
Ecdsa
Gets the ECDsa object.
public ECDsa Ecdsa { get; }
Property Value
HashAlgorithm
Gets the HashAlgorithm to use.
public HashAlgorithmName HashAlgorithm { get; }
Property Value
KeyLength
Gets the length of the key.
public override int KeyLength { get; }
Property Value
- int
The length of the key.
PrivateKey
Gets the PrivateKey Bytes.
public byte[] PrivateKey { get; }
Property Value
- byte[]
Public
Gets the ECDSA public key.
public override BigInteger[] Public { get; }
Property Value
- BigInteger[]
An array with the ASCII-encoded curve identifier (e.g. "nistp256") at index 0, and the public curve point Q at index 1.
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Dispose(bool)
Releases unmanaged and - optionally - managed resources.
protected virtual void Dispose(bool disposing)
Parameters
disposing
booltrue to release both managed and unmanaged resources; false to release only unmanaged resources.
~EcdsaKey()
Finalizes an instance of the EcdsaKey class.
protected ~EcdsaKey()
ToString()
Gets the SSH name of the ECDSA Key.
public override string ToString()
Returns
- string
The SSH name of the ECDSA Key.