Description
Hi there,
Sorry that I am new in arduino.
I just make a test as follow:
uint8_t key[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
char data[] = "0123456789012345";
aes256_enc_single(key, data);
Serial.println(data);
Serial.println(data);
char output[base64_enc_len(sizeof(data))];
//base64_encode(output, data, sizeof(data));
aes256_dec_single(key, data);
Serial.print("decrypted:");
Serial.println(data);
This will be output correctly (the decryption is successful)
�⸮⸮⸮⸮�s⸮�B⸮⸮3⸮O
�⸮⸮⸮⸮�s⸮�B⸮⸮3⸮O
decrypted:0123456789012345
But when include back the function base64_encode(output, data, strlen(data)); it makes the decryption failed.
Kf⸮⸮eh@⸮⸮⸮I⸮⸮f⸮�
Kf⸮⸮eh@⸮⸮⸮I⸮⸮f⸮�
decrypted:⸮�⸮`:Q⸮⸮c⸮D ,⸮|⸮
Seems the encoder make some modification to the input data.
Am I missing something here..?
Thanks.