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

Function uint64ToBase64

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

Source from the content-addressed store, hash-verified

32}
33
34std::string uint64ToBase64(uint64_t data) {
35 std::array<uint8_t, sizeof(data)> bytes;
36 for (size_t i = 0; i < 8; i++) {
37 bytes.at(i) = (data >> (i * 8)) & 0xFF;
38 }
39 return binaryToBase64(bytes.data(), bytes.size());
40}
41
42bool base64ToBinaryInternal(const char* encodedString, size_t inSize, std::vector<uint8_t>* ret) {
43 // Strip out newlines since the decoder returns an error code (0) if it finds them within the encoded string.

Callers

nothing calls this directly

Calls 4

binaryToBase64Function · 0.85
atMethod · 0.80
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected