Module refinery.units.encoding.b32

Expand source code Browse git
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import base64

from .. import Unit


class b32(Unit):
    """
    Base32 encoding and decoding.
    """
    def reverse(self, data):
        return base64.b32encode(data)

    def process(self, data):
        return base64.b32decode(data, casefold=True)

Classes

class b32

Base32 encoding and decoding.

Expand source code Browse git
class b32(Unit):
    """
    Base32 encoding and decoding.
    """
    def reverse(self, data):
        return base64.b32encode(data)

    def process(self, data):
        return base64.b32decode(data, casefold=True)

Ancestors

Inherited members