public static function octetStringToInteger(OctetString $os): Integer
    {
        $num = gmp_import($os->string(), 1, GMP_MSW_FIRST | GMP_BIG_ENDIAN);
        return new Integer(gmp_strval($num, 10));
    }