diff options
author | Andrew Shadura <andrewsh@debian.org> | 2017-02-07 21:41:51 +0100 |
---|---|---|
committer | Andrew Shadura <andrewsh@debian.org> | 2017-02-07 21:41:51 +0100 |
commit | 35f29cba23fc56f87acaff1741ec8d921db0c59f (patch) | |
tree | 298703a4334eb61c2877f3285402eb68a2b8581f /README.rst |
Imported Upstream version 1.1.0
Diffstat (limited to 'README.rst')
-rw-r--r-- | README.rst | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..5796b7b --- /dev/null +++ b/README.rst @@ -0,0 +1,33 @@ +Unpadded Base64 +=============== + +.. image:: https://img.shields.io/pypi/v/unpaddedbase64.svg + :target: https://pypi.python.org/pypi/unpaddedbase64/ + :alt: Latest Version + +.. image:: https://img.shields.io/travis/matrix-org/python-unpaddedbase64.svg + :target: https://travis-ci.org/matrix-org/python-unpaddedbase64 + +Encode and decode Base64 without "=" padding. + +`RFC 4648`_ specifies that Base64 should be padded to a multiple of 4 bytes +using "=" characters. However this conveys no benefit so many protocols choose +to use Base64 without the "=" padding. + +.. _`RFC 4648`: https://tools.ietf.org/html/rfc4648 + +Installing +---------- + +.. code:: bash + + pip install unpaddedbase64 + +Using +----- + +.. code:: python + + import unpaddedbase64 + assert (unpaddedbase64.encode_base64(b'\x00')) == u'AA' + assert (unpaddedbase64.decode_base64(u'AA')) == b'\x00' |