MCPcopy Create free account
hub / github.com/Clarionos/clarion / create_base58_map

Function create_base58_map

libraries/clcrypto/base58.cpp:11–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9constexpr char base58_chars[] = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
10
11constexpr auto create_base58_map() {
12 std::array<int8_t, 256> base58_map{{0}};
13 for (unsigned i = 0; i < base58_map.size(); ++i)
14 base58_map[i] = -1;
15 for (unsigned i = 0; i < sizeof(base58_chars); ++i)
16 base58_map[base58_chars[i]] = i;
17 return base58_map;
18}
19
20constexpr auto base58_map = create_base58_map();
21

Callers 1

base58.cppFile · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected