jdev - 2021-06-14


  1. 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?

  2. flow

    Sam, probably an oversight, so the examples are wrong

  3. Link Mauve

    Sam, pad bits in the context of base64 means the bits needed to fill the 6-bit “digits”, = padding is different.

  4. Link Mauve

    For instance, when you encode the '\0' byte, valid encodings encompass AA== all the way to AP==.

  5. 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.

  6. 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.

  7. flow

    interesting, I also confused it with = padding then. especially since = padding is not required in XML

  8. flow

    do typical base64 libs allow to set those padding bits to anything different than 0? what does the rfc state?

  9. flow

    These pad bits MUST be set to zero by conforming encoders, which is described in the descriptions on padding below.

  10. 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?

  11. jonas’

    Today is Setting Orange, the 19th day of Confusion in the YOLD 3187

  12. jonas’

    I think all’s said with that.

  13. jonas’

    good morning ;)

  14. flow

    morning ;)

  15. tommiegunner

    Hey guys