Method VerifySignature
- Namespace
- SshSharp
- Assembly
- SshSharp.dll
VerifySignature(ReadOnlySpan<byte>, ReadOnlySpan<byte>)
Verifies an SSH signature made by this key's private key over data. The signature is in the SSH encoding
(string algorithm || string signature, RFC 4253 section 6.6), as agents and SshKeySigner produce it, and its
algorithm must be one the key type signs with: ssh-ed25519, the key's ecdsa-sha2-*, or rsa-sha2-256 and
rsa-sha2-512 for an RSA key (SHA-1 ssh-rsa signatures are refused).
public bool VerifySignature(ReadOnlySpan<byte> data, ReadOnlySpan<byte> signature)
Parameters
dataReadOnlySpan<byte>The data that was signed.
signatureReadOnlySpan<byte>The signature blob.
Returns
- bool
True when the signature is valid; false for a wrong, malformed or mismatched signature.
Exceptions
- NotSupportedException
The key is a FIDO security key (
sk-), whose signatures are not verified here.