import base64


def decode_base64(data):
    """Decodes a base64 string to binary."""
    data = data.replace("\n", "")
    data = data.replace(" ", "")
    data = base64.b64decode(data)
    return data