# VerifySignature

Required Frends version: 5.7+

Required .NET version: 8.0

Compatible Agents: Unknown

Source code: <https://github.com/FrendsPlatform/Frends.Pgp/tree/main/Frends.Pgp.VerifySignature>

{% tabs %}
{% tab title="Parameter: Input" %}

| Name                            | Description                                                                                                                                                                       |
| ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| FilePath : `String`             | <p>Path to the original file (for detached signature) or signed file (for attached signature).</p><p><br>Default: <code>-</code><br>Example: <code>C:\temp\message.txt</code></p> |
| IsDetachedSignature : `Boolean` | <p>Whether the signature is detached (separate .sig file) or attached (signature embedded in signed file).</p><p><br>Default: <code>True</code><br>Example: <code>true</code></p> |
| SignatureFilePath : `String`    | <p>Path to the detached signature file. Required only when IsDetachedSignature is true.</p><p><br>Default: <code>-</code><br>Example: <code>C:\temp\message.txt.sig</code></p>    |
| {% endtab %}                    |                                                                                                                                                                                   |

{% tab title="Parameter: Options" %}

| Name                             | Description                                                                                                                                                  |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| PublicKey : `String`             | <p>Public key file path or ASCII-armored public key content.</p><p><br>Default: <code>-</code><br>Example: <code>C:\temp\publickey.asc</code></p>            |
| UseFileKey : `Boolean`           | <p>If true, PublicKey is treated as a file path. If false, treated as raw key string.</p><p><br>Default: <code>True</code><br>Example: <code>true</code></p> |
| SignatureBufferSize : `Int32`    | <p>Buffer size in KB for reading the file during signature verification</p><p><br>Default: <code>16</code><br>Example: <code>16</code></p>                   |
| ThrowErrorOnFailure : `Boolean`  | <p>Whether to throw an error on failure.</p><p><br>Default: <code>True</code><br>Example: <code>true</code></p>                                              |
| ErrorMessageOnFailure : `String` | <p>Overrides the error message on failure.</p><p><br>Default: <code>-</code><br>Example: <code>Custom error message</code></p>                               |
| {% endtab %}                     |                                                                                                                                                              |

{% tab title="Result: Result" %}

| Name                   | Description                                                                                                                    |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| Success : `Boolean`    | <p>Indicates if the task completed successfully.<br>Example: <code>true</code></p>                                             |
| IsValid : `Boolean`    | <p>Indicates whether the signature is valid.<br>Example: <code>true</code></p>                                                 |
| SignerKeyId : `String` | <p>Key ID that was used for signing (in hexadecimal format).<br>Example: <code>A1234B5678...</code></p>                        |
| Error : `Error`        | <p>Error that occurred during task execution.<br>Example: <code>object { string Message, Exception AdditionalInfo }</code></p> |
| {% endtab %}           |                                                                                                                                |

{% tab title="Changelog" %}

## Changelog

### \[1.1.0] - 2026-02-23

#### Fixed

* Ensure FrendsTaskMetadata.json is included in NuGet package

### \[1.0.0] - 2026-01-12

#### Added

* Initial implementation
  {% endtab %}
  {% endtabs %}
