Open sualko opened 6 years ago
Which data exactly? I didn't implement b64 myself and am generally using the glib function g_base64_encode()
. I just checked and it doesn't have any options I might be misusing.
It's hard to remember after one year, but I think to every data (key, payload, signedPreKeySignature, ...). If you are using https://github.com/GNOME/glib/blob/e0e4968dca8ad737753c0d6f8034c6f08c5002e8/glib/gbase64.c#L261-L281 there should be no line breaks, because line_breaks
is false.
It's hard to remember after one year
I can imagine! Sorry, I got a bit overwhelmed with issues at the time and later falsely remembered that I was just waiting for more input on all of them until I had another look recently.
If you are using https://github.com/GNOME/glib/blob/e0e4968dca8ad737753c0d6f8034c6f08c5002e8/glib/gbase64.c#L261-L281 there should be no line breaks, because line_breaks is false.
I am (in the libomemo
submodule), and that line has not changed for 12 years so I doubt it's a glib version issue either. I'm going to check whether I do anything weird with the resulting XML in this plugin itself - one thing that comes to mind is exporting a string and reimporting it because I didn't want to deal with libxml2
in libomemo
and serializing was a quick and good enough solution so I can use mxml
.
First I'll look at the raw XMPP from the debug log to see if I can find the line breaks though, never really noticed such a thing.
I discovered that lurch in version 0.6.7 adds newlines after a couple of characters to it's Base64 encoded data. This is probably a bug, according to RFC 4648:
Because in XEP-0384 I find no advice, regarding a max line length.