3 ms·
> While Base64 encoding is very useful to transfer binary data over the web This part I cannot fathom. The era of 7-bit bytes is over. What can possibly justif
by loup-vaillant 9y ago
> While Base64 encoding is very useful to transfer binary data over the web
This part I cannot fathom. The era of 7-bit bytes is over. What can possibly justify the need for a "printable characters" encoding now? Something stupid like putting data in a JSON string? What's the next step, base-64 encode the JSON containing that string and put it in an XML tag?
- dylz 9y agoI see crap like: <data><![CDATA[PD94bWw+PHdoeS8+PHRoaXNpc2F3ZnVsPjwvcm9vdD4=]]></data> constantly in real life in 2018
- loup-vaillant 9y agoYes, but why? There's a reason for everything, so I guess this serves some purpose, somehow? I guess the ultimate reason is stupidity or bad planning or cut corners, but I'm still curious. Bonus point if there's a situation where avoiding something like base64 is actually difficult, even in 2018.
- jessaustin 9y agoIf one wanted to embed a random token in an email, what would one use instead of base64?
- loup-vaillant 9y agoAttachments?
- jessaustin 9y agoISTM that amounts to the same thing? MIME is Base64.
- loup-vaillant 9y ago<facepalm>
- jancsika 9y agoIsn't this likely due to a second-order effect? For example, there is (was?) a bug in nw.js with using @font-face to specify a font url that is in the same (local) location as the manifest. As a hack I tried specifying the font as a base64-encoded data url. It worked! I had no use for base64, other than that there exists an interface for specifying data and it takes a base64-encoded string.
- 0culus 9y agoI've seen base64 used to implement "security through obscurity" in web applications. Many times in situations where they could have just used a cryptographic hash and been done with it.