def remove_padding(data: bytes) -> bytes:
    """
    Removes ISO/IEC 9797-1 Padding method 2 from data
    """
    for idx, b in enumerate(reversed(data), start=1):
        if b == 0x80:
            return data[: len(data) - idx]
    return b""