ESP32 Arduino: Base64 encoding (using crypto/base64 lib)

Опубликовано: 17 Март 2026
на канале: Techtutorialsx
5,489
40

This tutorial explains how to encode a plain text string into base64 format, using the ESP32 and the Arduino core.

**IMPORTANT NOTE**: as indicated in the implementation file of the library, the caller is responsible for freeing the returned buffer with the encoded string. So, although not included in the video, you should call the free function on the returned pointer when you no longer need it.

Implementation file: https://github.com/espressif/esp-idf/...

Free function: https://en.cppreference.com/w/c/memor...

Base64 encode online tool: https://www.base64encode.org/
Base64 decode online tool: https://www.base64decode.org/

Format specifiers: http://www.cplusplus.com/reference/cs...


Related content (written tutorials):
Base64 encoding: https://techtutorialsx.com/2017/12/09...
Base64 decoding: https://techtutorialsx.com/2018/11/27...
HMAC SHA256: https://techtutorialsx.com/2018/01/25...
AES ECB mode: https://techtutorialsx.com/2018/04/18...


A lot more ESP32 tutorials:
https://techtutorialsx.com/category/e...

ESP8266 tutorials:
https://techtutorialsx.com/category/e...