MCPcopy Create free account
hub / github.com/MihailRis/voxelcore / base64_encode_

Function base64_encode_

src/util/stringutil.cpp:229–234  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

227}
228
229inline void base64_encode_(const ubyte* segment, char* output) {
230 output[0] = B64ABC[(segment[0] & 0b11111100) >> 2];
231 output[1] = B64ABC[((segment[0] & 0b11) << 4) | ((segment[1] & 0b11110000) >> 4)];
232 output[2] = B64ABC[((segment[1] & 0b1111) << 2) | ((segment[2] & 0b11000000) >> 6)];
233 output[3] = B64ABC[segment[2] & 0b111111];
234}
235
236std::string util::base64_encode(const ubyte* data, size_t size) {
237 std::stringstream ss;

Callers 1

base64_encodeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected