def pad(data):

    """
    ccavenue method to pad data.
    :param data: plain text
    :return: padded data.
    """

    length = 16 - (len(data) % 16)
    data += chr(length)*length
    return data