gifti icon indicating copy to clipboard operation
gifti copied to clipboard

Line breaks in Base64 strings

Open gllmflndn opened this issue 5 years ago • 0 comments

Sometimes Base64 strings contain line breaks (typically) every 76 characters: they should be ignored as well as any other character that is not in the Base64 character list. This is implemented in base64decode.m: https://github.com/gllmflndn/gifti/blob/master/%40gifti/private/base64decode.m#L36-L39 but not in base64.c. Fixing this will probably result in cancelling the speed advantage of the current C implementation with respect to other ones. Base64 encoding should not be modified to include line breaks.

See e.g.:

<Data>AhkAAANGAAACZAAABTcAAAJkAAADRgAAAmQAAAU3AACDEQAAA0YAAEIGAAAFNwAAgxEAAANkAAAC
ZAAABGQAAAJkAAADZAAAAmQAAARkAAACGQAAA2QAAMUNAAAEZAAAYwQAAAJGAACILwAABGQAAIgv
AAACRgAA
</Data>

gllmflndn avatar Aug 30 '19 16:08 gllmflndn