MCPcopy Create free account
hub / github.com/Kitware/CMake / Base32Encode5

Function Base32Encode5

Source/cmBase32.cxx:15–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13}
14
15static void Base32Encode5(unsigned char const src[5], char dst[8])
16{
17 // [0]:5 bits
18 dst[0] = Base32EncodeChar((src[0] >> 3) & 0x1F);
19 // [0]:3 bits + [1]:2 bits
20 dst[1] = Base32EncodeChar(((src[0] << 2) & 0x1C) + ((src[1] >> 6) & 0x03));
21 // [1]:5 bits
22 dst[2] = Base32EncodeChar((src[1] >> 1) & 0x1F);
23 // [1]:1 bit + [2]:4 bits
24 dst[3] = Base32EncodeChar(((src[1] << 4) & 0x10) + ((src[2] >> 4) & 0x0F));
25 // [2]:4 bits + [3]:1 bit
26 dst[4] = Base32EncodeChar(((src[2] << 1) & 0x1E) + ((src[3] >> 7) & 0x01));
27 // [3]:5 bits
28 dst[5] = Base32EncodeChar((src[3] >> 2) & 0x1F);
29 // [3]:2 bits + [4]:3 bit
30 dst[6] = Base32EncodeChar(((src[3] << 3) & 0x18) + ((src[4] >> 5) & 0x07));
31 // [4]:5 bits
32 dst[7] = Base32EncodeChar((src[4] << 0) & 0x1F);
33}
34
35// -- Class methods
36

Callers 1

encodeStringMethod · 0.85

Calls 1

Base32EncodeCharFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…