Converts a src string encoded in Base64 (RFC 4648 section 4) to its binary equivalent, writing it to a dest buffer, returning true on success. If src contains invalid characters, dest is cleared and returns false. If padding is included (note that Base64Escape() does produce it), it must be correct. In the padding, '=' and '.' are treated identically.

Synopsis

Declared in <absl/strings/escaping.h>

bool
Base64Unescape(
    std::string_view src,
    std::string* dest);

Return Value

true on success, false if src contains invalid characters.

Parameters

Name

Description

src

The base64‐encoded string to decode.

dest

The output string that receives the decoded bytes.

Created with MrDocs