Base 32 Decode
Table of Contents
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:
| Parameters | Data type | Description |
|---|---|---|
| <response> | TEXT | Variable that stores the decoded value returned as the response |
| <data> | TEXT | Represents 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
|
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:
responseThe TEXT response representing the decoded output
encoded_valueThe 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:
responseThe TEXT response representing the decoded output
encoded_valueThe TEXT containing the Base32 encoded data
"UTF-16LE"Specifies the character set used for decoding