Function: base64.decode

Decodes given Base64-encoded string to bytes.

The carriage return (\r) and newline (\n) characters in the input are ignored.

Arguments

Arguments
data

string

The input to be decoded.

padding

boolean

Specifies whether the input should be expected to be aligned to a multiple of 4 bytes, using a padding character (default: true).

Returns

The decoded bytes.

Raised exceptions

Exceptions
ValueError If characters outside of the Base64 alphabet are encountered, or if padding == true and the input is not aligned to a multiple of 4 bytes.