from typing import Dict
import base64
import json


def encoded_to_json(encoded_string: str) -> Dict:
    """
    Transform your encoded string to dict.

    Parameters
    ----------
    encoded_string: str
        your string base64 encoded.

    Returns
    -------
    Dict
        your string cast to a dict.
    """
    decode = base64.b64decode(
        encoded_string + "=" * (-len(encoded_string) % 4),
    )
    return json.loads(decode)