bool IsStrictBase64(absl::string_view data) { // Strict base64 must be a multiple of 4 bytes and have no whitespace. return data.size() % 4 == 0 && absl::c_none_of(data, absl::ascii_isspace);
}
} // namespace
std::optional<std::string> Base64Decode(absl::string_view data,
Base64DecodeOptions options) { // absl::Base64Unescape is forgiving. Return nullopt if the input is not // strict.
if (options == Base64DecodeOptions::kStrict && !IsStrictBase64(data)) { return std::nullopt;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.