How to use the pybase64._pybase64.b64encode function in pybase64

To help you get started, we’ve selected a few pybase64 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mayeut / pybase64 / pybase64 / __init__.py View on Github external
def standard_b64encode(s):
        """Encode bytes using the standard Base64 alphabet.

        Argument ``s`` is a :term:`bytes-like object` to encode.

        The result is returned as a :class:`bytes` object.
        """
        return b64encode(s)
github mayeut / pybase64 / pybase64 / __init__.py View on Github external
def urlsafe_b64encode(s):
        """Encode bytes using the URL- and filesystem-safe Base64 alphabet.

        Argument ``s`` is a :term:`bytes-like object` to encode.

        The result is returned as a :class:`bytes` object.

        The alphabet uses '-' instead of '+' and '_' instead of '/'.
        """
        return b64encode(s, b'-_')