public function decode($value)
{
if (!is_numeric($value)) {
throw new InvalidArgumentException('Argument should be an integer');
}
switch (static::$mode) {
case static::MODE_GMP:
return gmp_intval(gmp_mul((int) $value ^ $this->xor, $this->inverse)) & static::MAX_INT;
default:
return ((int) $value ^ $this->xor) * $this->inverse & static::MAX_INT;
}
}