MCPcopy Create free account
hub / github.com/Thalhammer/jwt-cpp / index

Function index

include/jwt-cpp/base.h:140–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138 } // namespace helper
139
140 inline uint32_t index(const std::array<int8_t, 256>& rdata, char symbol) {
141 auto index = rdata[static_cast<unsigned char>(symbol)];
142 if (index <= -1) { throw std::runtime_error("Invalid input: not within alphabet"); }
143 return static_cast<uint32_t>(index);
144 }
145 } // namespace alphabet
146
147 /**

Callers 2

TESTFunction · 0.85
decodeFunction · 0.85

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.68