MCPcopy Create free account
hub / github.com/Snapchat/Valdi / base64ToUInt64

Function base64ToUInt64

libs/utils/src/utils/encoding/Base64Utils.cpp:80–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78 return decodedData;
79}
80
81bool base64ToBinary(std::string_view base64, std::vector<uint8_t>& decodedData) {
82 return base64ToBinaryInternal(base64.data(), base64.size(), &decodedData);
83}
84
85bool base64UrlToBinary(std::string_view base64url, std::vector<uint8_t>& decodedData) {
86 std::string standardBase64;
87 standardBase64.reserve(base64url.size() + 4);
88 standardBase64.append(base64url.data(), base64url.size());
89 standardBase64.erase(std::remove(standardBase64.begin(), standardBase64.end(), '\n'), standardBase64.end());
90 standardBase64.erase(std::remove(standardBase64.begin(), standardBase64.end(), '\r'), standardBase64.end());
91 base64UrlToBase64InPlace(standardBase64);
92 if (standardBase64.empty()) {
93 decodedData.clear();

Callers

nothing calls this directly

Calls 3

base64ToBinaryFunction · 0.85
minFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected