Table of Contents

Method Verify

Namespace
SshSharp
Assembly
SshSharp.dll

Verify(ReadOnlySpan<byte>, string)

Whether this is a valid signature over message by PublicKey, for namespace. It does not say whether to trust the key: check that with SshAllowedSigners, or compare PublicKey with the key you expect.

public bool Verify(ReadOnlySpan<byte> message, string @namespace)

Parameters

message ReadOnlySpan<byte>
namespace string

Returns

bool

Verify(ReadOnlySpan<byte>, string, SshPublicKey)

Whether this is a valid signature over message, for namespace, by expectedKey: Verify(ReadOnlySpan<byte>, string), and the signer's key is the one you trust, as ssh-keygen -Y check-novalidate with a known key. A signature made with a certificate counts as its certified key's (GetPublicKey()); the certificate itself is not checked.

public bool Verify(ReadOnlySpan<byte> message, string @namespace, SshPublicKey expectedKey)

Parameters

message ReadOnlySpan<byte>

The message that was signed.

namespace string

What the signature must be for, for example git or file.

expectedKey SshPublicKey

The key that must have signed. Its comment is ignored.

Returns

bool

True when expectedKey made this signature over the message for the namespace; false otherwise.