If you look at the base 64 array in that code snippet you will see that it does not contain any whitespace characters.

So the base64 decoding ends at the first one it encounters because that is when the valid input ends.

If your input is somehow split into multiple block, you'll first have to reunite these blocks into one.

Cheers,
_