def pad(block, block_length):
    """
    Pads a block with padding bytes to make it
    to the required length, in this case, 128 bits.

    PKCS5 padding
    
    Parameters
    ----------

    block : string
        Block to be padded written in hexadecimal as string.

    block_length : int
        Block length in bytes.

    Returns
    
    -------
    block : string
        Block padded
    """
    bytes_to_pad = block_length - len(block) // 2

    for _ in range(bytes_to_pad):
        block += format(bytes_to_pad, '02x')

    return block