1
0
mirror of https://github.com/thooge/esp32-nmea2000-obp60.git synced 2025-12-29 13:33:06 +01:00
Files
esp32-nmea2000-obp60/lib/obp60task/ImageDecoder.cpp
2025-11-25 22:38:08 +01:00

15 lines
395 B
C++

#include "ImageDecoder.h"
#include <mbedtls/base64.h>
// Decoder for Base64 content
bool ImageDecoder::decodeBase64(const String& base64, uint8_t* outBuffer, size_t outSize, size_t& decodedSize) {
int ret = mbedtls_base64_decode(
outBuffer,
outSize,
&decodedSize,
(const unsigned char*)base64.c_str(),
base64.length()
);
return (ret == 0);
}