Arduino AES encryption and PHP AES decryption

I am trying to encrypt a string in my Arduino device and send it to server using HTTP POST command.

I used this AES library:
AES Library Arduino

I used this base64 library:
base64

this PHP script:
AES PHP

Code for encryption and then base64 encoding:

#include <AESLib.h> 
#include <Base64.h>


void setup() {
Serial.begin(57600);
uint8_t key[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
char data[] = "abcdefghijklmnop"; //16 chars == 16 bytes
aes128_enc_single(key, data);
Serial.print("encrypted:");
Serial.println(data);

// encoding base64 starts here
int inputLen = sizeof(data);
  
  int encodedLen = base64_enc_len(inputLen);
  char encoded[encodedLen];
  
  Serial.print(data); Serial.print(" = ");
  
  // note input is consumed in this step: it will be empty afterwards
  base64_encode(encoded, data, inputLen); 
  
  Serial.println(encoded);

}

void loop() {
  // put your main code here, to run repeatedly:

}

after aes encryption and base64 encoding I tried to Decrypt my encoded string in my server using this PHP script but the decrypted result doesn't match with my original data.
I used this PHP AES script,
PHP AES

I am new to Arduino and PHP and trying to solve this problem from last few days. Please help me with this problem.

It appears to be that you are encrypting the data, encoding it, and then decrypting the encoded data.

Why? You would need to decode the data, then decrypt the decoded data.

PaulS:
It appears to be that you are encrypting the data, encoding it, and then decrypting the encoded data.

Why? You would need to decode the data, then decrypt the decoded data.

I encrypted then encoded in Arduino and then copied the encoded string and decoded, decrypted it in PHP but i didn't got my string which i encrypted in Arduino. I also tried without encoding, just encryption.

enc_single is mode_ecb, works OK for me, cool library!

but you want to use the other method in the library as ecb mode not very secure. (encryption of same data always produces same encrypted data)