-
Sam
In bits of binary it says that when doing base64 the pad bits must be zero, but the examples all show padding. Am I missing something or are the examples just wrong?
-
flow
Sam, probably an oversight, so the examples are wrong
-
Link Mauve
Sam, pad bits in the context of base64 means the bits needed to fill the 6-bit “digits”, = padding is different.
-
Link Mauve
For instance, when you encode the '\0' byte, valid encodings encompass AA== all the way to AP==.
-
Link Mauve
Because the encoded data is on 12 bits so it must have four bits of padding, and the mention in the XEP means that these must all be set to zero.✎ -
Link Mauve
Because the encoded data is on 6 × 2 = 12 bits so it must have four bits of padding, and the mention in the XEP means that these must all be set to zero. ✏
-
flow
interesting, I also confused it with = padding then. especially since = padding is not required in XML
-
flow
do typical base64 libs allow to set those padding bits to anything different than 0? what does the rfc state?
-
flow
These pad bits MUST be set to zero by conforming encoders, which is described in the descriptions on padding below.
-
flow
wait, xep231 talks not about setting the pad bits to zero, but about setting the number of pad bits to zero? what does that even mean?
-
jonas’
Today is Setting Orange, the 19th day of Confusion in the YOLD 3187
-
jonas’
I think all’s said with that.
-
jonas’
good morning ;)
-
flow
morning ;)
-
tommiegunner
Hey guys