Base 32 Decode

Description

The zoho.encryption.base32Decode task is used to decode text that is encoded in base 32 format.

Info: If a character set was specified during encoding, the same character set must be used during decoding. Using a different character set may result in incorrect output.

Syntax

<response> = zoho.encryption.base32Decode(<data>, <source_character_set>);

where:

ParametersData typeDescription
<response>TEXTVariable that stores the decoded value returned as the response
<data>TEXTRepresents the Base32 encoded text that needs to be decoded
<source_character_set>
(Optional)
TEXT

Specifies the character set used during encoding. If not specified, the default character set is applied

Supported Values

  • UTF-8 (Default)
  • UTF-16LE
  • UTF-16BE

Examples

Example 1: Decode Base32 encoded text

The following script decodes Base32 encoded text using the default UTF-8 character set.

encoded_value = "NJXWQ3SAPJ4WY23FOIXGG33N";
response = zoho.encryption.base32Decode(encoded_value);
// Returns john@zylker.com

 

Note: Since the <source_character_set> parameter is not specified, the input is decoded using the default UTF-8 character set.

where:

response
The TEXT response representing the decoded output
encoded_value
The TEXT containing the Base32 encoded data

Example 2: Decode text using a specific character set

The following script decodes Base32 encoded text using the UTF-16LE character set.

encoded_value = "MEAHAADJABPQA2YAMUAHSAA";
response = zoho.encryption.base32Decode(encoded_value, "UTF-16LE");
// Returns api_key

where:

response
The TEXT response representing the decoded output
encoded_value
The TEXT containing the Base32 encoded data
"UTF-16LE"
Specifies the character set used for decoding

Related Links