src/Bech32.cpp
uint32_t polymod(const Data& values) {
    uint32_t chk = 1;
    for (size_t i = 0; i < values.size(); ++i) {
        uint8_t top = chk >> 25;
        chk = (chk & 0x1ffffff) << 5 ^ values[i] ^
            (-((top >> 0) & 1) & 0x3b6a57b2UL) ^
            (-((top >> 1) & 1) & 0x26508e6dUL) ^
            (-((top >> 2) & 1) & 0x1ea119faUL) ^
            (-((top >> 3) & 1) & 0x3d4233ddUL) ^
            (-((top >> 4) & 1) & 0x2a1462b3UL);
    }
    return chk;
}
/** Find the polynomial with value coefficients mod the generator as 30-bit. */
Find the polynomial with value coefficients mod the generator as 30-bit.
Find the polynomial with value coefficients mod the generator as 30 - bit .
uint32_t polymod(const Data& values) {
    uint32_t chk = 1;
    for (size_t i = 0; i < values.size(); ++i) {
        uint8_t top = chk >> 25;
        chk = (chk & 0x1ffffff) << 5 ^ values[i] ^
            (-((top >> 0) & 1) & 0x3b6a57b2UL) ^
            (-((top >> 1) & 1) & 0x26508e6dUL) ^
            (-((top >> 2) & 1) & 0x1ea119faUL) ^
            (-((top >> 3) & 1) & 0x3d4233ddUL) ^
            (-((top >> 4) & 1) & 0x2a1462b3UL);
    }
    return chk;
}
uint32_t polymod ( const Data & values ) { uint32_t chk = 1 ; for ( size_t i = 0 ; i < values . size ( ) ; ++ i ) { uint8_t top = chk >> 25 ; chk = ( chk & 0x1ffffff ) << 5 ^ values [ i ] ^ ( - ( ( top >> 0 ) & 1 ) & 0x3b6a57b2UL ) ^ ( - ( ( top >> 1 ) & 1 ) & 0x26508e6dUL ) ^ ( - ( ( top >> 2 ) & 1 ) & 0x1ea119faUL ) ^ ( - ( ( top >> 3 ) & 1 ) & 0x3d4233ddUL ) ^ ( - ( ( top >> 4 ) & 1 ) & 0x2a1462b3UL ) ; } return chk ; }
Find the polynomial with value coefficients mod the generator as 30-bit.
Find the polynomial with value coefficients mod the generator as 30 - bit .