folly::base64URLDecode

base64URLDecode overloads

Synopses

Declared in <folly/base64.h>

Decode a URL-safe base64 string.

std::string
base64URLDecode(std::string_view s);
» more...

Decode a URL-safe base64 string into an output buffer.

constexpr
base64_decode_result
base64URLDecode(
    std::string_view s,
    char* o) noexcept;
» more...

Decode a URL-safe base64 byte range into an output buffer.

constexpr
base64_decode_result
base64URLDecode(
    char const* f,
    char const* l,
    char* o) noexcept;
» more...

Exceptions

NameThrown on
base64_decode_errorif the input is not valid base64URL.

Return Value

  • The decoded string.
  • The decode result with success flag and output end pointer.

Parameters

NameDescription
sThe base64URL-encoded bytes to decode.
oPointer to the output buffer.
fPointer to the first input byte.
lPointer past the last input byte.