DecodeBase64

Decode a base64-encoded string.

Synopsis

Declared in <util/strencodings.h>

std::optional<std::vector<unsigned char>>
DecodeBase64(std::string_view str);

Return Value

The decoded bytes, or std::nullopt if the input is not valid base64.

Parameters

NameDescription
strThe base64 text to decode.