Incorrect decode Base_64 #7403
Replies: 1 comment
-
Posted at 2020-04-24 by @gfwilliams Could you provide an actual example please? Posted at 2020-04-27 by user111703 I see that problem is some symbols of line control that must be ignored by 'atob', but they decoded as 0x00 so that final decode is inccorrect. Attachments: Posted at 2020-04-27 by @MaBecker Looks like this one : Base64 decoding (atob) of padded strings yields trailing \x00 Tested on VERSION: "2v05.19",
output
Posted at 2020-04-28 by user111703 Of course , I delete new line chars, but more easy to fix it source code. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-04-24 by user111703
When use function atob ('base64_text') then result not matched to binary data. For example first bytes of TLS key is 0x30, 0x82, 0x03... is "MIID...", but Espruino decode this string start from 0x00.
Beta Was this translation helpful? Give feedback.
All reactions