diff options
Diffstat (limited to '')
-rw-r--r-- | gf8.cc | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -57,7 +57,7 @@ struct Galois8_table // addition/subtraction is exclusive or { uint8_t * const mul_row = mul_table + i * size; for( int j = 1; j < size; ++j ) - mul_row[j] = ilog[(log[i] + log[j]) % (size - 1)]; + mul_row[j] = ilog[(log[i] + log[j]) % (size-1)]; } for( int i = 0; i < size; ++i ) mul_table[0 * size + i] = mul_table[i * size + 0] = 0; @@ -79,7 +79,7 @@ bool check_inverse( const uint8_t * const A, const uint8_t * const B, uint8_t sum = 0; for( unsigned i = 0; i < k; ++i, ++pa, pb += k ) sum ^= gf.mul_table[*pa * gf.size + *pb]; - if( sum != ( row == col ) ) return false; // A * B != I + if( sum != ( row == col ) ) return false; } return true; } |