addOrSubtract static method

int addOrSubtract(
  1. int a,
  2. int b
)

Implements both addition and subtraction -- they are the same in GF(size).

@return sum/difference of a and b

Implementation

static int addOrSubtract(int a, int b) {
  return a ^ b;
}