Dave Nasralla:
> Nevermind, though I'm not entirely sure this isn't a kind of bug.
> If you change the Encoding by adding two equal signs to the end
> "eyJ1c2VySWQiOiJiMDhmODZhZi0zNWRhLTQ4ZjItOGZhYi1jZWYzOTA0NjYwYmQifQ=="
>
> It properly decodes to:
>
Hi,
Base64 encoded data has a length which is multiple of 4.
If not, it should be padded with "=" (1 to 3 "=")
Your data is not strict base64 as it does not follow this.
Looks like 4D does not like when it is not padded.
// pad with "=" to make text a multiple of 4
C_LONGINT($vl_padModulo)
Nevermind, though I'm not entirely sure this isn't a kind of bug.
If you change the Encoding by adding two equal signs to the end
"eyJ1c2VySWQiOiJiMDhmODZhZi0zNWRhLTQ4ZjItOGZhYi1jZWYzOTA0NjYwYmQifQ=="
It properly decodes to:
{"userId":"b08f86af-35da-48f2-8fab-cef3904660bd"}
Some online decoding
Can anyone tell me what I am doing wrong here. In the code below I am
getting back the same text I and trying to decode.
C_BLOB($Blob_vx)
C_TEXT($EncodedText_vt)
$EncodedText_vt:="eyJ1c2VySWQiOiJiMDhmODZhZi0zNWRhLTQ4ZjItOGZhYi1jZWYzOTA0NjYwYmQifQ"
TEXT TO BLOB($EncodedText_vt;$Blob_vx;UTF8 text
4 matches
Mail list logo