public static function convert(string $uuid)
    {
        // convert to 16 byte binary representation
        $bin = hex2bin(str_replace(['{', '-', '}'], '', $uuid));

        // xor first half with second to give 8 bytes
        $xor = self::xor(...str_split($bin, 8));

        // convert to a 64-bit signed integer
        return unpack('q', $xor)[1];
    }