---
title: OPENSSL_DECRYPT
url: https://www.tines.com/docs/formulas/functions/openssl-decrypt/
kind: formula-function
---

*[tines.com](https://www.tines.com/llms.txt) › [Docs](https://www.tines.com/llms.txt) › [Formulas](https://www.tines.com/llm/docs/formulas.md) › [Functions](https://www.tines.com/llm/docs/formulas/functions.md)*

# OPENSSL_DECRYPT

*[View on tines.com](https://www.tines.com/docs/formulas/functions/openssl-decrypt/)*

Decrypts encrypted data using OpenSSL. 

The output is your plaintext. Arguments:

encrypted: The encrypted ciphertext.

algorithm: The algorithm to use, one of ["aes-128-cbc", "aes-256-cbc", "aes-256-gcm", "aes-256-ecb", "aes-128-ecb"].

key: The key to decrypt with.

iv: The initialization vector used during encryption. Value must be set to "" or nil when algorithm does not support an IV (such as AES ECB).

aad: The unencrypted data to be authenticated. Only supported by AEAD algorithms.

auth_tag: The authentication tag. Only supported by AEAD algorithms.

**Categories:** Encryption

## Syntax

```
OPENSSL_DECRYPT(ciphertext, algorithm, key, iv, [aad], [auth_tag])
```

## Examples

### Example 1

Formula:

```
=OPENSSL_DECRYPT(input.ciphertext, "aes-256-cbc", CREDENTIAL.secret_key, input.iv)
```

## Sample actions

```json
{
  "standardLibVersion": "69",
  "actionRuntimeVersion": "2",
  "agents": [
    {
      "disabled": false,
      "name": "OPENSSL_ENCRYPT",
      "description": "",
      "options": {
        "mode": "message_only",
        "loop": false,
        "payload": {
          "openssl_encrypt": "=OPENSSL_ENCRYPT(my_action.message, \"aes-256-gcm\", CREDENTIAL.aes_secret_key)"
        }
      },
      "position": {
        "x": 1620,
        "y": 1830
      },
      "type": "eventTransformation",
      "timeSavedUnit": "minutes",
      "timeSavedValue": 0,
      "monitorAllEvents": false,
      "monitorFailures": false,
      "monitorNoEventsEmitted": null,
      "form": null
    },
    {
      "disabled": false,
      "name": "My Action",
      "description": "",
      "options": {
        "mode": "message_only",
        "loop": false,
        "payload": {
          "message": "This is a private message for your eyes only!"
        }
      },
      "position": {
        "x": 1725,
        "y": 1740
      },
      "type": "eventTransformation",
      "timeSavedUnit": "minutes",
      "timeSavedValue": 0,
      "monitorAllEvents": false,
      "monitorFailures": false,
      "monitorNoEventsEmitted": null,
      "form": null
    },
    {
      "disabled": false,
      "name": "AES_ENCRYPT",
      "description": "",
      "options": {
        "mode": "message_only",
        "loop": false,
        "payload": {
          "openssl_encrypt": "=OPENSSL_ENCRYPT(my_action.message, CREDENTIAL.aes_secret_key)"
        }
      },
      "position": {
        "x": 1800,
        "y": 1830
      },
      "type": "eventTransformation",
      "timeSavedUnit": "minutes",
      "timeSavedValue": 0,
      "monitorAllEvents": false,
      "monitorFailures": false,
      "monitorNoEventsEmitted": null,
      "form": null
    }
  ],
  "links": [
    {
      "sourceIdentifier": 1,
      "receiverIdentifier": 0
    },
    {
      "sourceIdentifier": 1,
      "receiverIdentifier": 2
    }
  ],
  "diagramNotes": []
}
```
