---
title: RSA_AES_HYBRID_ENCRYPT
url: https://www.tines.com/docs/formulas/functions/rsa-aes-hybrid-encrypt/
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)*

# RSA_AES_HYBRID_ENCRYPT

*[View on tines.com](https://www.tines.com/docs/formulas/functions/rsa-aes-hybrid-encrypt/)*

Encrypts data of arbitrary length using a provided public or private RSA key, in a hybrid cryptosystem internally using AES. A padding choosing from "PKCS1_PADDING", "PKCS1_OAEP_PADDING" and "SSLV23_PADDING" can be passed in with "PKCS1_PADDING" being the default.

**Categories:** Encryption

## Syntax

```
RSA_AES_HYBRID_ENCRYPT(plain_message, key, [padding: "PKCS1_PADDING"])
```

## Examples

### Example 1

Formula:

```
RSA_AES_HYBRID_ENCRYPT(plain_message, key)
```

Output:

```json
[
  "(encrypted aes key)",
  "(encrypted initialization vector)",
  "(encrypted data)"
]
```

### Example 2

Formula:

```
RSA_AES_HYBRID_ENCRYPT(plain_message, key, padding: "PKCS1_PADDING")
```

Output:

```json
[
  "(encrypted aes key)",
  "(encrypted initialization vector)",
  "(encrypted data)"
]
```
