def base64_b64decode(instr):
    if six.PY3:
        b = salt.utils.to_bytes(instr)
        data = base64.b64decode(b)
        try:
            return salt.utils.to_str(data)
        except UnicodeDecodeError:
            return data
    return base64.b64decode(instr)
Decode a base64-encoded string using the "modern" Python interface
dataset/ETHPy150Open saltstack/salt/salt/modules/hashutil.py/base64_b64decode