When converting a base64 from the payload of a JSON Web Token (aka JWT) I discovered that the base64 string was ‘slightly out of spec’ in that it was not padded to ensure it’s length was a multiple of 4. To solve this problem I had to append some padding characters to it for Base64::convertFromBase64 to work. Maybe this could happen internally? Here is what I ended up doing
Not that I’m aware. I just had problems decoding base64 encoded strings from our server (using PHP 7.2 64-bit) and then found that algorithm online. I’ve used that as I couldn’t figure out right away why the base64_decode in JUCE wasn’t working.