| 64 | } |
| 65 | |
| 66 | inline uint8_t DecodeChar(char c) { |
| 67 | if (c & 0x80) { |
| 68 | throw DeadlyImportError("Invalid base64 char value: ", size_t(c)); |
| 69 | } |
| 70 | return tableDecodeBase64[size_t(c & 0x7F)]; // TODO faster with lookup table or ifs? |
| 71 | } |
| 72 | |
| 73 | void Encode(const uint8_t *in, size_t inLength, std::string &out) { |
| 74 | if (in == nullptr || inLength==0) { |
no test coverage detected