| 27 | #include <string.h> |
| 28 | |
| 29 | static uint32_t bech32_polymod_step(uint32_t pre) { |
| 30 | uint8_t b = pre >> 25; |
| 31 | return ((pre & 0x1FFFFFF) << 5) ^ |
| 32 | (-((b >> 0) & 1) & 0x3b6a57b2UL) ^ |
| 33 | (-((b >> 1) & 1) & 0x26508e6dUL) ^ |
| 34 | (-((b >> 2) & 1) & 0x1ea119faUL) ^ |
| 35 | (-((b >> 3) & 1) & 0x3d4233ddUL) ^ |
| 36 | (-((b >> 4) & 1) & 0x2a1462b3UL); |
| 37 | } |
| 38 | |
| 39 | static uint32_t bech32_final_constant(bech32_encoding enc) { |
| 40 | if (enc == BECH32_ENCODING_BECH32) return 1; |
no outgoing calls
no test coverage detected