public function isInCidrRange(string $cidrIpShort, $cidrMask): bool
    {
        if (is_string($cidrMask) && !ctype_digit($cidrMask)) {
            throw new \InvalidArgumentException(
                    'cidrMask must be of type int or a string losslessly'
                    . ' convertible to int.'
            );
        }

        list($lower, $upper) = $this->calculateIpRange(
                $this->completeCidrIp($cidrIpShort),
                (int) $cidrMask
        );
        return $this->asLong() >= $lower &&  $this->asLong() <= $upper;
    }