Previous Topic: AutoShell FunctionsNext Topic: base64Encode--Perform a base64 Encoding of a String (Function)


base64Decode--Decode a base64 Encoded String (Function)

This function performs the decoding of a base64 encoded string. The input string does not require base64Encode(). Any valid base64 encoded string can be passed for decoding.

The function has the following syntax:

base64Decode(sEncoded)

The function returns a string holding the decoded data. If an error occurs, for example, in case of malformed input data, the function raises an exception.

sEncoded

Specifies the string to decode.

Example

Decode a string with error handling:

try
{
    ? base64Decode("SGVsbG8gV29ybGQh");
}
catch(ex)
{
    ? "Error decoding string"
}

See also:

base64Encode--Perform a base64 Encoding of a String (Function)