Encrypt a macro using a program that originally encrypts strings

This is my program that takes gps coordinates and send them to me as a message on my cell phone

#include <DFRobot_sim808.h>
#include <SoftwareSerial.h>

#define MESSAGE_LENGTH 160
char message[MESSAGE_LENGTH];
int messageIndex = 0;
char MESSAGE[300];
char lat[12];
char lon[12];
char wspeed[12];

char phone[16];
char datetime[24];

#define PIN_TX 10
#define PIN_RX 11
SoftwareSerial mySerial(PIN_TX,PIN_RX);
DFRobot_SIM808 sim808(&mySerial);//Connect RX,TX,PWR,

void sendSMS();
void getGPS();
void readSMS();

void setup()
{
  mySerial.begin(9600);
  Serial.begin(9600);

  //******** Initialize sim808 module *************
  while(!sim808.init())
  {
      Serial.print("Sim808 init error\r\n");
      delay(1000);
  }
  delay(3000);

  Serial.println("SIM Initialization success");
      
  Serial.println("Text me a sms!");
}
void loop()
{
  //*********** Detecting unread SMS ************************
   messageIndex = sim808.isSMSunread();

   //*********** At least, there is one UNREAD SMS ***********
   if (messageIndex > 0)
   { 

      readSMS();
      getGPS();
      sendSMS();
  
      //************* Turn off the GPS power ************
      sim808.detachGPS();

      Serial.println("Please send SMS message to me!");
   }
}

void readSMS()
{
  Serial.print("messageIndex: ");
  Serial.println(messageIndex);
  
  sim808.readSMS(messageIndex, message, MESSAGE_LENGTH, phone, datetime);
     //***********In order not to full SIM Memory, is better to delete it**********
      sim808.deleteSMS(messageIndex);
      

void getGPS()
{ 
  while(!sim808.attachGPS())
  {
    Serial.println("Open the GPS power failure");
    delay(1000);
  }
  delay(3000);

  Serial.println("Open the GPS power success");
    
  while(!sim808.getGPS())
  {
    
  }

 

  float la = sim808.GPSdata.lat;
  float lo = sim808.GPSdata.lon;
  float ws = sim808.GPSdata.speed_kph;

  dtostrf(la, 4, 6, lat); //put float value of la into char array of lat. 4 = number of digits before decimal sign. 6 = number of digits after the decimal sign.
  dtostrf(lo, 4, 6, lon); //put float value of lo into char array of lon
  dtostrf(ws, 6, 2, wspeed);  //put float value of ws into char array of wspeed

  sprintf(MESSAGE, "Latitude : %s\nLongitude : %s\nWind Speed : %s kph\nhttp://maps.google.com/maps?q=%s,%s\n", lat, lon, wspeed, lat, lon);
}

void sendSMS()
{
  Serial.println("Start to send message ...");
  
  Serial.println(MESSAGE);
  Serial.println(phone);
  
  sim808.sendSMS(phone,MESSAGE);
}

Now i wanted to encrypt the contents of my sms message . i have found this libaray that is used to encrypt strings.

/*------------------------------------------------------------------------------ 
Program:      aesEncDec 
 
Description:  Basic setup to test AES CBC encryption/decryption using different 
              key lengths.
 
Hardware:     Arduino Uno R3 
 
Software:     Developed using Arduino 1.8.2 IDE
 
Libraries:    
              - AES Encryption Library for Arduino and Raspberry Pi: 
                https://spaniakos.github.io/AES/index.html
 
References: 
              - Advanced Encryption Standard by Example: 
              http://www.adamberent.com/documents/AESbyExample.pdf
              - AES Class Reference: https://spaniakos.github.io/AES/classAES.html
 
Date:         July 9, 2017
 
Author:       G. Gainaru, https://www.arduinolab.net
              (based on AES library documentation and examples)
------------------------------------------------------------------------------*/
#include <AES.h>
#include "./printf.h"

AES aes ;

unsigned int keyLength [3] = {128, 192, 256}; // key length: 128b, 192b or 256b

byte *key = (unsigned char*)"01234567890123456789012345678901"; // encryption key
byte plain[] = "https://www.arduinolab.net/aes-encryptiondecryption-using-arduino-uno/"; // plaintext to encrypt

unsigned long long int myIv = 36753562; // CBC initialization vector; real iv = iv x2 ex: 01234567 = 0123456701234567

void setup ()
{
  Serial.begin (9600) ;
  printf_begin();
  
}

void loop () 
{
  for (int i=0; i < 3; i++)
  {
    Serial.print("- key length [b]: ");
    Serial.println(keyLength [i]);
    aesTest (keyLength[i]);
    delay(2000);
  }
}

void aesTest (int bits)
{
  aes.iv_inc();
  
  byte iv [N_BLOCK] ;
  int plainPaddedLength = sizeof(plain) + (N_BLOCK - ((sizeof(plain)-1) % 16)); // length of padded plaintext [B]
  byte cipher [plainPaddedLength]; // ciphertext (encrypted plaintext)
  byte check [plainPaddedLength]; // decrypted plaintext
  
  aes.set_IV(myIv);
  aes.get_IV(iv);

  Serial.print("- encryption time [us]: ");
  unsigned long ms = micros ();
  aes.do_aes_encrypt(plain,sizeof(plain),cipher,key,bits,iv);
  Serial.println(micros() - ms);

  aes.set_IV(myIv);
  aes.get_IV(iv);
  
  Serial.print("- decryption time [us]: ");
  ms = micros ();
  aes.do_aes_decrypt(cipher,aes.get_size(),check,key,bits,iv); 
  Serial.println(micros() - ms);
  
  Serial.print("- plain:   ");
  aes.printArray(plain,(bool)true); //print plain with no padding

  Serial.print("- cipher:  ");
  aes.printArray(cipher,(bool)false); //print cipher with padding

  Serial.print("- check:   ");
  aes.printArray(check,(bool)true); //print decrypted plain with no padding
  
  Serial.print("- iv:      ");
  aes.printArray(iv,16); //print iv
  printf("\n===================================================================================\n");
}

Now somehow i want my whole message to be converted into a string so that i can encrypt it. Any help would be appreciated.

Now somehow i want my whole message to be converted into a string

What is it now if it is not a string ?

Note : a string is not a String

syedwafax:
so that i can encrypt it

Why?
How are you going to de-crypt it once it gets to your phone?

sprintf(MESSAGE, "Latitude : %s\nLongitude : %s\nWind Speed : %s kph\nhttp://maps.google.com/maps?q=%s,%s\n", lat, lon, wspeed, lat, lon);

Right there it is. That's putting the whole thing together into a string called MESSAGE. If your other library needs a string then send it that one.