# DecryptFile

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.DecryptFile>

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

| Name                              | Description                                                                                                                                    |
| --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| SourceFilePath : `String`         | <p>Path to the file containing the data to be decrypted.</p><p><br>Default: <code>-</code><br>Example: <code>C:\secrets\message.gpg</code></p> |
| OutputFilePath : `String`         | <p>Path where the decrypted file will be saved to.</p><p><br>Default: <code>-</code><br>Example: <code>C:\messages\result.txt</code></p>       |
| DecryptBufferSize : `Int32`       | <p>Buffer size in KB that will be used when decrypting the file.</p><p><br>Default: <code>64</code><br>Example: <code>64</code></p>            |
| PrivateKeyPath : `String`         | <p>Path to the private key file.</p><p><br>Default: <code>-</code><br>Example: <code>C:\keys\my\_key.asc</code></p>                            |
| 🗝PrivateKeyPassphrase : `String` | <p>Passphrase for the private key.</p><p><br>Default: <code>-</code><br>Example: <code>P\@ssw0rd</code></p>                                    |
| {% endtab %}                      |                                                                                                                                                |

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

| Name                             | Description                                                                                                                    |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| 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>                                             |
| 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-09

#### Added

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