public static byte[] wht( int word )
    {
        byte[] b = new byte[32];
        byte sum = 0;
        for( int i = 0; i < 32; i++ )
        {
            sum = 0;
            for( int j = 0; j < 32; j++ )
            {
                sum += ( 1 - 2 * ( ( Integer.bitCount( i & j ) ^ ( ( word >> ( 31 - j ) ) & 1 ) ) % 2 ) );
            }
            b[i] = sum;
        }
        return b;
    }