MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / base64Value

Method base64Value

Libraries/Http/HttpHeaders.cpp:53–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51 }
52
53 static int base64Value(char c)
54 {
55 if (c >= 'A' and c <= 'Z')
56 {
57 return c - 'A';
58 }
59 if (c >= 'a' and c <= 'z')
60 {
61 return c - 'a' + 26;
62 }
63 if (c >= '0' and c <= '9')
64 {
65 return c - '0' + 52;
66 }
67 if (c == '+')
68 {
69 return 62;
70 }
71 if (c == '/')
72 {
73 return 63;
74 }
75 return -1;
76 }
77
78 static char base64Char(uint8_t value)
79 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected