def clean(decrypted: bytes) ->str:
    """Strip padding from decrypted value.

    Remove number indicated by padding
    e.g. if last is '\\x0e' then ord('\\x0e') == 14, so take off 14.

    Args:
        decrypted: decrypted value
    Returns:
        Decrypted stripped of junk padding

    """
    last = decrypted[-1]
    if isinstance(last, int):
        return decrypted[:-last].decode('utf8')
    return decrypted[:-ord(last)].decode('utf8')
