# Encrypt Symmetric

> Kalipso Studio 6.1 documentation · https://doc.sysdevmobile.com/kalipso/6.1/documentation/actions/group-code-flow/encrypt-symmetric
>
> Encrypts a file or text with a shared key using AES CBC or ECB PKCS5 padding, with options for key type, salt, rounds, IV and Base64 output.

Encrypt Symmetric allows to encrypt data with a unique Key. This Key needs to be the same to Encrypt and Decrypt.

Action available for the following operating systems:

![OS Supported: Android, iOS, Win, Win32](https://doc.sysdevmobile.com/kalipso/assets/images/01_Supported_OS-5c02a51fd5080a410a07ee3ef72b6872.png)

### Parameters

* **Data Type**_\<numeric> -_ Select a File or Text to be Encrypted.
  * Dynamic
    * 1 - File
    * 2 - Text UTF-16 LE
    * 3 - Text ANSI/Binary
    * 4 - Text UTF-8
* **Source Text**_\<String> -_ Select a File/Text/Variable or control to be Encrypted.
* **Target**_<> -_ Select a Variable or Control.
* **Resulting Encoding**_\<numeric>_
  * Dynamic
    * 1 - None (Binary)
    * 2 - Base 64
* **Algorithm**_\<numeric> -_ Select the algorithm to be used:
  * Dynamic
    * 1 - AES CBC PKCS5 Padding
    * 2 - AES EBC PKCS5 Padding
* **Key Type**_\<numeric>_
  * Dynamic
    * 1 - 128 bit key
    * 2 - 256 bit key
    * 3 - Generate SHA256 from key
    * 4 - Generate HMAC SHA256 from key
* **Key**_\<string> -_ Fill with a String, Control or Variable. It is expected the binary key value, without any encoding like Base64 or other.
* **Salt**_\<string> -_ In cryptography, salt is random data that is used as an additional entry for a unidirectional function that "breaks" data, a password or passphrase. Salts are used to protect passwords in storage. To use fill with a String, Control or Variable. It is expected the binary key value, without any encoding like Base64 or other.
* **Nbr. of Rounds**_\<numeric> -_ Fill with a Numeric value, Control or Variable.
* **IV Type**_<> -_ Select a Initialization vector (IV):
  * **Provided** (in this case you have to provide the initialization vector in **IV** parameter).
  * **Generate Random** (in this case Kalipso will generate a random initialization vector and it will return it in **IV target**).
* **IV / IV Target**_\<numeric> -_ Select a Variable or a Control.
* **Appended Result to IV**_<> -_ Select Yes or No. If you select Yes, the result of this action will start with the initialization vector, followed by the encrypted value.
