mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2025-12-29 13:33:06 +01:00
HTTP request for PageNavigation
This commit is contained in:
14
lib/obp60task/ImageDecoder.cpp
Normal file
14
lib/obp60task/ImageDecoder.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#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);
|
||||
}
|
||||
Reference in New Issue
Block a user