Function: base64.encode

Encodes given bytes to Base64 text.

Arguments

Arguments
data

bytes

The input to be encoded.

padding

boolean

Specifies whether padding characters should be used to align the output to a multiple of 4 bytes (default: true).

Returns

The encoded Base64 output, as a string.