private static int polymod ( final byte [ ] values ) { int c = 1 ; for ( byte v_i : values ) { int c0 = ( c >>> 25 ) & 0xff ; c = ( ( c & 0x1ffffff ) << 5 ) ^ ( v_i & 0xff ) ; if ( ( c0 & 1 ) != 0 ) c ^= 0x3b6a57b2 ; if ( ( c0 & 2 ) != 0 ) c ^= 0x26508e6d ; if ( ( c0 & 4 ) != 0 ) c ^= 0x1ea119fa ; if ( ( c0 & 8 ) != 0 ) c ^= 0x3d4233dd ; if ( ( c0 & 16 ) != 0 ) c ^= 0x2a1462b3 ; } return c ; }
Find the polynomial with value coefficients mod the generator as 30 - bit .