#include "base64.h" // This is just a wrapper for cencode.h, but only for encoding
#include "libb64/cdecode.h"
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
String toBeEncoded = "Hello world!";
Serial.print("\nString to be base64 encoded: ");
Serial.println(toBeEncoded);
String encoded = base64::encode(toBeEncoded);
Serial.print("String encoded: ");
Serial.println(encoded);
char decoded[64];
base64_decode_chars(encoded.c_str(), encoded.length(), decoded);
Serial.print("String decoded: ");
Serial.println(decoded);
}
void loop() {
// put your main code here, to run repeatedly:
delay(10); // this speeds up the simulation
}