> For the complete documentation index, see [llms.txt](https://docs.emobiq.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.emobiq.com/emobiq-client/006-actions-and-visual-logic/action-reference/cordova/string/encrypt.md).

# encrypt

## Description

Encrypt the passed value.

See 'decrypt' function for the decrypt function.

## Input / Parameter

| Name  | Description                                       | Input Type  | Default | Options     | Required                           |
| ----- | ------------------------------------------------- | ----------- | ------- | ----------- | ---------------------------------- |
| type  | The type of encryption to use for the encryption. | String/Text | aes     | aes, aes256 | Yes                                |
| key   | The key to use for the encryption.                | String/Text | -       | -           | Yes                                |
| iv    | The vector to use for the encryption.             | String/Text | -       | -           | Partial (Yes if type is 'aes256'.) |
| value | The value to be encrypted.                        | String/Text | -       | -           | Yes                                |

## Output

| Description                  | Output Type |
| ---------------------------- | ----------- |
| Returns the encrypted value. | String/Text |

## Callback

N/A

## Video

Coming soon.

## Example

Coming soon.

### Steps

Coming soon.

### Result

Coming soon.

## Links
