MCPcopy Create free account
hub / github.com/FreeFem/FreeFem-sources / encodeB64_3Bytes

Function encodeB64_3Bytes

plugin/seq/iovtk.cpp:108–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106}
107
108void encodeB64_3Bytes(unsigned char *in3Bytes, unsigned char *out4Bytes) {
109 if (in3Bytes == NULL || out4Bytes == NULL) {
110 return;
111 }
112
113 out4Bytes[0] = EncodeB64_Mul4Byte[in3Bytes[0]];
114 out4Bytes[1] = EncodeB64_LoopByte[((in3Bytes[0] & 0x03) << 4) + ((in3Bytes[1] & 0xf0) >> 4)];
115 out4Bytes[2] = EncodeB64_LoopByte[((in3Bytes[1] & 0x0f) << 2) + ((in3Bytes[2] & 0xc0) >> 6)];
116 out4Bytes[3] = EncodeB64_LoopByte[in3Bytes[2]];
117}
118
119// ===========================
120//

Callers 1

encodeB64Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected