Choose where you’d like to start

aesEncode128

Overview

The aesEncode128 function takes encryption_key and encryption_value as arguments, and returns an encrypted text using AES (Advanced Encryption Standard).

Note: The encryption is performed with 128 bits.

Return Type

  • TEXT

Syntax

<variable> = zoho.encryption.aesEncode128(<encryption_key>, <encryption_value>, <encryption_iv>, <iteration_count>);

where,

ParameterData typeDescription
<variable>TEXTVariable which will contain the encrypted text.
<encryption_key>TEXT

The key used during encryption of the text.

Note

  • The <encryption_key> needs to be used while performing decryption.
  • The <encryption_key> can contain upto 16 characters.
<encryption_value>TEXTThe piece of text that needs to be encrypted.

<encryption_iv>

(optional)

TEXT

An initialization vector that offers stronger security for the encryption.

Note:

  • This parameter should be of 16 characters.
  • The same IV number that is used for encryption should be provided while decrypting the encrypted text.

<iteration_count>

(optional)

TEXTThe number of times the function is repeatedly performed to produce the final encryption key. By default, this number is 0 if this parameter is not included.

 

Note: For operations that have a null <encryption_IV> input, you will encounter an execution error if:

  • the size of the <encryption_value> exceeds 500KB.
  • the <iteration_count> exceeds 200.

Examples

info zoho.encryption.aesEncode("passkey","This is a secret");               // Returns "birQ6wvRvqy8IKsE0kb/Y2Mqf1oLp3yVaHDRhQjvAS5wt5ykJLM4OufE/GQoHhWy"

encryption = zoho.encryption.aesEncode128("passkey","This is a secret","a00000000000000b",201);
info encryption;                         //Returns "pWBt7NM4llIu0n9gES91lR5fXNaAG/mx5UNPtJY0Bv8=">

where:

passkey
This is the encryption key
This is a secret
This is the value to be encrypted
a00000000000000b
This is the encryption IV
201
This is the iteration count

Get Started Now

Execute