SAP Help Home SAP Intelligent RPA Help Portal SAP Intelligent RPA Community

Module - Base64 Encoding

Collection of functions related to Base64 encoding.

Activities

Encode String

Encode a string or a binary array to a Base64 string.


Technical Name Type Minimal Agent Version
encode synchronous WIN-3.24, MAC-3.24, CLOUD-3.34

Input Parameters:

Name Type Attributes Default Description
input any mandatory Input string or binary array to be encoded in Base64.
isBinary boolean optional false If set to true, the input string is considered as raw, not in UTF8.

Output Parameters:

Name Type Description
result string Encoded string.

Sample Code:

const auth = 'Basic ' + irpa_core.base64.encode('MyLogin:MyPassword');



Decode String

Decode a Base64 string to a string.


Technical Name Type Minimal Agent Version
decode synchronous WIN-3.24, MAC-3.24, CLOUD-3.34

Input Parameters:

Name Type Attributes Default Description
input string mandatory Base64 input string to be decoded.
isBinary boolean optional false If set to true, the output string remains raw, and is not encoded in UTF8.

Output Parameters:

Name Type Description
result string Decoded string or object.

Sample Code:

// decode a base 64 string const sContent = irpa_core.base64.decode('8KCut+mHjuWutg==');



Encode URI

Dedicated function to encode URL to handle special URL characters. Do not use for regular encoding.


Technical Name Type Minimal Agent Version
encodeURI synchronous WIN-3.24, MAC-3.24, CLOUD-3.34

Input Parameters:

Name Type Attributes Default Description
input string mandatory Input string or binary array to be encoded in Base64.

Output Parameters:

Name Type Description
result string Encoded string.

Sample Code:

const txt64 = irpa_core.base64.encodeURI('https://mysite.org/?x=value1');