mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2025-12-29 21:43:06 +01:00
15 lines
395 B
C++
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);
|
|
}
|