Last active
March 31, 2021 08:45
-
-
Save vixtory09678/f9261eb55cbf9002837ac886666e85fb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Arduino.h> | |
extern "C" { | |
#include "crypto/base64.h" | |
} | |
void setup() { | |
Serial.begin(9600); | |
const char* message = "Hello World"; | |
size_t outputLen; | |
unsigned char *encode = base64_encode((const unsigned char*)message, strlen(message), &outputLen); | |
unsigned char *decode = base64_decode(encode, outputLen, &outputLen); | |
Serial.print("plaintext : "); Serial.println(message); | |
Serial.print("encode : "); Serial.println((char*)encode); | |
Serial.print("decode : "); Serial.println((char*)decode); | |
} | |
void loop() { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment