15 size_t num_words = inwords.size();
16 if ( (num_bits+31)/32 > num_words )
18 std::cout <<
"ERROR: not enough words (" << num_words <<
") for " << num_bits <<
"-bit CRC calculation." << std::endl;
22 for (
size_t i = 0 ;
i < num_bits ; ++
i )
24 if ( (inwords.at(
i/32)>>(
i%32)) & 1 )
39 size_t num_words = inwords.size();
40 if ( (num_bits+31)/32 > num_words )
42 std::cout <<
"ERROR: not enough words (" << num_words <<
") for " << num_bits <<
"-bit CRC calculation." << std::endl;
52 for (
size_t i = 0 ;
i < num_bits ; ++
i )
55 val |= (inwords[
i/32]>>(31-
i%32))&1;