Base64Decode

(System Library)

Description: Performs a Base64 decode of a buffer.

If neither of the optional parameters are present, this function is treated as a wrapper for Base64Decoder.

Returns: Buffer
Usage: Script Only.
Function Groups: Encryption
Related to: Base64Decoder | Base64Encode | Hash
Format: System.Base64Decode(Buffer[, Offset, isMIME, URLSafe]);
Parameters:  
Buffer
Required. The encoded value.
Offset
Optional numeric. Offset into the buffer, at which to start decoding. Defaults to zero if invalid.
isMIME
Optional Boolean. If TRUE, relaxes the constraint regarding characters that aren't in the base64 alphabet, per RFC2045. Defaults to FALSE if invalid.
URLSafe
Optional Boolean. If TRUE, an alphabet that is URL and filename safe will be used.
Comments:

This function complies with IETF RFC4648 and RFC2045 .

Returns Invalid if the input buffer is invalid, or if IsMime is TRUE and the buffer contains invalid characters as per RFC2045. Whitespace characters will be ignored rather than cause failure.

Example:

  If Valid(EncodedValue);
  [
    DecodedValue = System.Base64Decode(EncodedValue);
    EncodedValue = Invalid;
  ]