Class RsaDigitalSignature
- Namespace
- Renci.SshNet.Security.Cryptography
- Assembly
- Renci.SshNet.dll
Implements RSA digital signature algorithm.
public class RsaDigitalSignature : DigitalSignature, IDisposableInheritance
Implements
Inherited Members
Constructors
RsaDigitalSignature(RsaKey)
Initializes a new instance of the Renci.SshNet.Security.Cryptography.RsaDigitalSignature class with the SHA-1 hash algorithm.
public RsaDigitalSignature(RsaKey rsaKey)Parameters
rsaKeyRsaKey-
The RSA key.
RsaDigitalSignature(RsaKey, HashAlgorithmName)
Initializes a new instance of the Renci.SshNet.Security.Cryptography.RsaDigitalSignature class.
public RsaDigitalSignature(RsaKey rsaKey, HashAlgorithmName hashAlgorithmName)Parameters
rsaKeyRsaKey-
The RSA key.
hashAlgorithmNameHashAlgorithmName-
The hash algorithm to use in the digital signature.
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
disposingbool-
true to release both managed and unmanaged resources; false to release only unmanaged resources.
Sign(byte[])
Creates the signature.
public override byte[] Sign(byte[] input)Parameters
inputbyte[]-
The input.
Returns
- byte[]
-
Signed input data.
Verify(byte[], byte[])
Verifies the signature.
public override bool Verify(byte[] input, byte[] signature)