MCPcopy Create free account
hub / github.com/JeanLucPons/VanitySearch / bech32_polymod_step

Function bech32_polymod_step

Bech32.cpp:28–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26#include "Bech32.h"
27
28uint32_t bech32_polymod_step(uint32_t pre) {
29 uint8_t b = pre >> 25;
30 return ((pre & 0x1FFFFFF) << 5) ^
31 (-((b >> 0) & 1) & 0x3b6a57b2UL) ^
32 (-((b >> 1) & 1) & 0x26508e6dUL) ^
33 (-((b >> 2) & 1) & 0x1ea119faUL) ^
34 (-((b >> 3) & 1) & 0x3d4233ddUL) ^
35 (-((b >> 4) & 1) & 0x2a1462b3UL);
36}
37
38static const char* charset = "qpzry9x8gf2tvdw0s3jn54khce6mua7l";
39

Callers 2

bech32_encodeFunction · 0.85
bech32_decodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected