def padding_method_2(data: bytes, pad_to: int) -> bytes:
    """
    Pads data to n blocks using ISO/IEC 9797-1 Padding method 2
    """
    data = data + bytes([0x80])
    if len(data) % pad_to != 0:
        data = data + bytes([0] * (pad_to - (len(data)) % pad_to))
    return data