# Decrypt Text

> `UiPath.Cryptography.Activities.DecryptText`

`UiPath.Cryptography.Activities.DecryptText`

## Description

Decrypts a string based on a specified key encoding and algorithm.

## Project compatibility

**Windows - Legacy** | **Windows** | **Cross-platform**

## Windows, Cross-platform configuration

* **Algorithm** - A drop-down menu which enables you to select the decryption algorithm you want to use. The following options are available: **AES (Deprecated)**, **AES GCM**, **DES (Deprecated)**, **RC2 (Non-FIPS) (Deprecated)**, **Rijndael (Non-FIPS) (Deprecated)**, and **TripleDES**.
* **Text** - The text that you want to decrypt. This field supports only strings and `String` variables.
* **Key** - The key that you want to use to decrypt the specified text. This field supports only strings and `String` variables.

### Advanced options

#### Options
* **Key Encoding** - The encoding used to interpret the key specified in the **Key** property. The following options are available: **System default**, **Unicode**, **Unicode (Big-Endian)**, **Unicode (UTF-32)**, **Unicode (UTF-32 Big-Endian)**, **US-ASCII**, **Western European (ISO)**, and **Unicode (UTF-8)**.
* **Continue On Error** - Specifies if the automation should continue even if the activity throws an error. This field only supports Boolean values (`True`, `False`). The default value is `False`. As a result, if the field is blank and an error is thrown, the execution of the project stops. If the value is set to `True`, the execution of the project continues regardless of any error.

#### Output
* **Decrypted Text** - Reference to the decrypted text stored in a `String` variable for use in other activities.

## Windows - Legacy configuration

### Properties panel

#### Common
* **Continue On Error** - Specifies if the automation should continue even if the activity throws an error. This field only supports Boolean values (`True`, `False`). The default value is `False`. As a result, if the field is blank and an error is thrown, the execution of the project stops. If the value is set to `True`, the execution of the project continues regardless of any error.
  :::note
  If this activity is included in **Try Catch** and the value of the **Continue On Error** property is `True`, no error is caught when the project is executed.
  :::
* **DisplayName** - The display name of the activity.

#### Input
* **Algorithm** - A drop-down menu which enables you to select the decryption algorithm you want to use. The following options are available: **AES (Deprecated)**, **AES GCM**, **DES (Deprecated)**, **RC2 (Non-FIPS) (Deprecated)**, **Rijndael (Non-FIPS) (Deprecated)**, and **TripleDES**.
  :::note
  When using the **AES GCM** algorithm, the decryption input must be provided in the format of (concatenated bytes): `Salt (8bytes) + IV (12 bytes) + encryptedData (variable bytes) + Tag (16 bytes)`. The activity also uses the following parameters:
  * PBKDF2 iterations count is 10000
  * The generated key is 256-bit (32 bytes)
  
  Note that the 256-bit generated key is not the same as the **Key** input option.
  :::
* **Encoding** - The encoding used to interpret the input text and the key specified in the **Key** property. This field supports only `Encoding` variables. For more info on this variable type, please view the [official Microsoft documentation](https://docs.microsoft.com/en-us/dotnet/api/system.text.encoding?view=netframework-4.7.2).
* **Key** - The key that you want to use to decrypt the specified file. This field supports only strings and `String` variables.
* **Key Secure String** - The secure string used to decrypt the input string.
* **Text** - The text that you want to decrypt. This field supports only strings and `String` variables.

#### Misc
* **Private** - If selected, the values of variables and arguments are no longer logged at Verbose level.

#### Output
* **Result** - The decrypted text, stored in a `String` variable.
