Unpadded Base64
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Sean Quah b82e6b6b18
Configure @matrix-org/synapse-core to be the code owner for the repo (#8)
Signed-off-by: Sean Quah <seanq@element.io>
2021-10-25 14:31:39 +01:00
.github Configure @matrix-org/synapse-core to be the code owner for the repo (#8) 2021-10-25 14:31:39 +01:00
tests Version 2.1.0 2021-03-08 20:50:51 +00:00
unpaddedbase64 Version 2.1.0 2021-03-08 20:50:51 +00:00
.flake8 Switch to Poetry 2021-03-08 13:51:58 +00:00
.gitignore Switch to Poetry 2021-03-08 13:51:58 +00:00
LICENSE Unpadded Base64 2015-08-21 15:39:14 +01:00
pyproject.toml Version 2.1.0 2021-03-08 20:50:51 +00:00
README.rst Switch to declarative setup.cfg 2021-03-04 23:01:49 +00:00

Unpadded Base64
===============

Encode and decode Base64 without "=" padding.

`RFC 4648`_ specifies that Base64 should be padded to a multiple of 4 bytes
using "=" characters. However many protocols choose to omit the "=" padding.

.. _`RFC 4648`: https://tools.ietf.org/html/rfc4648

Installing
----------

.. code:: bash

   python3 -m pip install unpaddedbase64

Using
-----

.. code:: python

    import unpaddedbase64
    assert (unpaddedbase64.encode_base64(b'\x00')) == 'AA'
    assert (unpaddedbase64.decode_base64('AA')) == b'\x00'