> For the complete documentation index, see [llms.txt](https://docs.digibee.com/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digibee.com/documentation/connectors-and-triggers/connectors/security/pgp.md).

# PGP

**PGP (Pretty Good Privacy)** is an encryption connector that provides authentication and privacy for data communication.

## **Parameters**

Configure the connector using the parameters below. Fields that support [Double Braces expressions](/documentation/connectors-and-triggers/double-braces/overview.md) are marked in the **Supports DB** column.

{% tabs %}
{% tab title="General" %}

<table data-header-hidden="false" data-header-sticky><thead><tr><th width="112">Parameter</th><th width="231">Description</th><th width="83">Data type</th><th width="81">Supports DB</th><th width="100">Default</th><th width="129">Visible when</th></tr></thead><tbody><tr><td><strong>Use Dynamic Account</strong></td><td>If enabled, the connector uses the account dynamically via the <a href="/pages/0kxlZ011XP4A2T43v9kh"><strong>Store Account</strong></a> connector; otherwise, it uses the account statically as configured in <a href="/spaces/jvO5S91EQURCEhbZOuuZ/pages/fS1QLzAg8rGSSJFwtrvy"><strong>Accounts</strong></a> on the Platform.</td><td>Boolean</td><td>❌</td><td><code>false</code></td><td>—</td></tr><tr><td><strong>Scoped</strong></td><td>If enabled, isolates the stored account from other sub-processes. Not supported for accounts used in headers or body. To learn more, read the <a href="/spaces/jvO5S91EQURCEhbZOuuZ/pages/cbkYqH3fxzeL7zOKNawz">Dynamic Accounts documentation</a>.</td><td>Boolean</td><td>❌</td><td><code>false</code></td><td><strong>Use Dynamic Account</strong> is enabled</td></tr><tr><td><strong>Account Name</strong></td><td>Name of the account defined in the <a href="/pages/0kxlZ011XP4A2T43v9kh"><strong>Store Account</strong></a> connector.</td><td>String</td><td>✅</td><td>N/A</td><td><strong>Use Dynamic Account</strong> is enabled</td></tr><tr><td><strong>Account</strong></td><td>Account to be used by the connector. Must be a <strong>Public</strong> or <strong>Private Key</strong> account type, configured in <a href="/spaces/jvO5S91EQURCEhbZOuuZ/pages/fS1QLzAg8rGSSJFwtrvy"><strong>Accounts</strong></a> on the Platform.</td><td>String</td><td>❌</td><td>N/A</td><td><strong>Use Dynamic Account</strong> is disabled</td></tr><tr><td><strong>Operation</strong></td><td>Defines the type of operation to be performed: <strong>Encrypt Fields</strong>, <strong>Decrypt Fields</strong>, <strong>Encrypt Payload</strong>, <strong>Decrypt Payload</strong>, <strong>Encrypt File</strong>, or <strong>Decrypt File</strong>.</td><td>String</td><td>❌</td><td><code>Encrypt Fields</code></td><td>—</td></tr><tr><td><strong>Fields</strong></td><td>Names of the fields to be encrypted or decrypted within the JSON entry. Multiple fields must be separated by commas (e.g., <code>param1, param2</code>).</td><td>String</td><td>❌</td><td><code>parameter</code></td><td><strong>Operation</strong> is <strong>Encrypt Fields</strong> or <strong>Decrypt Fields</strong></td></tr><tr><td><strong>Payload</strong></td><td>Content to be encrypted or decrypted. Can be defined as a single fixed value or dynamically referenced using Double Braces expression to get and set the payload.</td><td>String</td><td>✅</td><td>N/A</td><td><strong>Operation</strong> is <strong>Encrypt Payload</strong> or <strong>Decrypt Payload</strong></td></tr><tr><td><strong>Charset</strong></td><td>Character encoding used to interpret the text.</td><td>String</td><td>❌</td><td><code>UTF-8</code></td><td>—</td></tr><tr><td><strong>File Name</strong></td><td>Name or full path of the file to be encrypted or decrypted (e.g., <code>tmp/processed/file.txt</code>).</td><td>String</td><td>✅</td><td>N/A</td><td><strong>Operation</strong> is <strong>Encrypt File</strong> or <strong>Decrypt File</strong></td></tr><tr><td><strong>Output File Name</strong></td><td>Name to be assigned to the resulting encrypted or decrypted file.</td><td>String</td><td>✅</td><td>N/A</td><td><strong>Operation</strong> is <strong>Encrypt File</strong> or <strong>Decrypt File</strong></td></tr><tr><td><strong>Hexadecimal</strong></td><td>If enabled, the value to be signed or verified must be provided in hexadecimal format; otherwise, it is signed or verified in base64 format.</td><td>Boolean</td><td>❌</td><td><code>true</code></td><td>—</td></tr><tr><td><strong>Armor</strong></td><td>If enabled, encrypts the message using ASCII armor so it can be transmitted in standard text-based formats, such as email.</td><td>Boolean</td><td>❌</td><td><code>false</code></td><td><strong>Operation</strong> is <strong>Encrypt Fields</strong>, <strong>Encrypt Payload</strong>, <strong>Encrypt File</strong></td></tr><tr><td><strong>Zip</strong></td><td>If enabled, compresses the message before encryption.</td><td>Boolean</td><td>❌</td><td><code>false</code></td><td><strong>Operation</strong> is <strong>Encrypt Fields</strong>, <strong>Encrypt Payload</strong>, <strong>Encrypt File</strong></td></tr><tr><td><strong>Integrity Check</strong></td><td>If enabled, verifies the integrity of the message during the operation.</td><td>Boolean</td><td>❌</td><td><code>true</code></td><td><strong>Operation</strong> is <strong>Encrypt Fields</strong>, <strong>Encrypt Payload</strong>, <strong>Encrypt File</strong></td></tr><tr><td><strong>Fail On Error</strong></td><td>If enabled, interrupts pipeline execution when an error occurs. Otherwise, execution proceeds and the result returns <code>false</code> for the <code>"success"</code> property.</td><td>Boolean</td><td>❌</td><td><code>false</code></td><td>—</td></tr></tbody></table>

{% endtab %}

{% tab title="Documentation" %}

| Parameter         | Description                                                                             | Data type | Supports DB | Default value |
| ----------------- | --------------------------------------------------------------------------------------- | --------- | ----------- | ------------- |
| **Documentation** | Optional field to describe the connector configuration and any relevant business rules. | String    | ❌           | N/A           |

{% endtab %}
{% endtabs %}

## **Messages flow**

### **Operation Encrypt Fields**

#### **Input**

```json
{  
    "parameter": "TEXT TO BE ENCRYPTED"
}
```

#### **Output**

```json
{  
    "parameter": "AA01FF" // text encrypted
}
```

### **Operation Decrypt Fields**

#### **Input**

```json
{  
    "parameter": "AA01FF" // text encrypted
}
```

#### **Output**

```json
{  
    "parameter": "TEXT DECRYPTED"
}
```

### **Operation Encrypt Payload**

#### **Input**

```json
{  
    "parameter": "TEXT TO BE ENCRYPTED"
}
```

#### **Output**

```json
{  
    "result": "AA01FF" // text encrypted
}
```

### **Operation Decrypt Payload**

#### **Input**

```json
{  
    "parameter": "AA01FF" // text encrypted
}
```

#### **Output**

```json
{  
    "result": "TEXT DECRYPTED"
}
```

### **Operation Encrypt File**

#### **Input**

```json
{  
    "fileName": "file.txt"
}
```

#### **Output**

```json
{  
    "outputFileName": "file.txt.pgp" // file encrypted
}
```

### **Operation Decrypt File**

#### **Input**

```json
{  
    "fileName": "file.txt.pgp" // file encrypted
}
```

#### **Output**

```json
{  
    "outputFileName": "file.txt.dec" // file decrypted
}
```

#### **Output with error**

```json
{   
    "error": "java.io.FileNotFoundException: data1.csv (No such file or directory)",  
    "success": false
}
```

* **success:** “false” when the operation fails.
* **error:** information about the occurred error.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.digibee.com/documentation/connectors-and-triggers/connectors/security/pgp.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
