Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 29 for Integer (0.28 sec)

  1. okhttp-tls/src/test/java/okhttp3/tls/internal/der/DerTest.kt

      }
    
      @Test fun `positive integer`() {
        val bytes = "020132".decodeHex()
        assertThat(Adapters.INTEGER_AS_LONG.toDer(50L)).isEqualTo(bytes)
        assertThat(Adapters.INTEGER_AS_LONG.fromDer(bytes)).isEqualTo(50L)
      }
    
      @Test fun `decode negative integer`() {
        val bytes = "02019c".decodeHex()
        assertThat(Adapters.INTEGER_AS_LONG.fromDer(bytes)).isEqualTo(-100L)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 31.7K bytes
    - Viewed (0)
  2. samples/tlssurvey/src/main/kotlin/okhttp3/survey/CipherSuiteSurvey.kt

          print(client.nameAndVersion)
        }
        println()
        val sortedSuites =
          ianaSuites.suites.sortedBy { ianaSuite ->
            val index = orderBy.indexOfFirst { it.matches(ianaSuite) }
            if (index == -1) Integer.MAX_VALUE else index
          }
        for (suiteId in sortedSuites) {
          print(suiteId.name)
          for (client in clients) {
            print("\t")
            val index = client.enabled.indexOfFirst { it.matches(suiteId) }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Tue Apr 02 01:44:15 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  3. samples/guide/src/main/java/okhttp3/recipes/PostStreaming.java

            }
          }
    
          private String factor(int n) {
            for (int i = 2; i < n; i++) {
              int x = n / i;
              if (x * i == n) return factor(x) + " × " + i;
            }
            return Integer.toString(n);
          }
        };
    
        Request request = new Request.Builder()
            .url("https://api.github.com/markdown/raw")
            .post(requestBody)
            .build();
    
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Fri Jul 06 03:18:15 GMT 2018
    - 2.1K bytes
    - Viewed (0)
  4. samples/static-server/src/main/java/okhttp3/sample/SampleServer.java

          return;
        }
    
        String keystoreFile = args[0];
        String password = args[1];
        String root = args[2];
        int port = Integer.parseInt(args[3]);
    
        SSLContext sslContext = sslContext(keystoreFile, password);
        SampleServer server = new SampleServer(sslContext, root, port);
        server.run();
      }
    
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Jan 02 02:50:44 GMT 2019
    - 4.7K bytes
    - Viewed (0)
  5. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/Certificate.kt

        } catch (e: GeneralSecurityException) {
          throw IllegalArgumentException("failed to decode certificate", e)
        }
      }
    }
    
    internal data class TbsCertificate(
      /** This is a integer enum. Use 0L for v1, 1L for v2, and 2L for v3. */
      val version: Long,
      val serialNumber: BigInteger,
      val signature: AlgorithmIdentifier,
      val issuer: List<List<AttributeTypeAndValue>>,
      val validity: Validity,
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.4K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/idn/Punycode.kt

      private const val DAMP = 700
      private const val INITIAL_BIAS = 72
      private const val INITIAL_N = 0x80
    
      /**
       * Returns null if any label is oversized so much that the encoder cannot encode it without
       * integer overflow. This will not return null for labels that fit within the DNS size
       * limits.
       */
      fun encode(string: String): String? {
        var pos = 0
        val limit = string.length
        val result = Buffer()
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Apr 03 03:04:50 GMT 2024
    - 8.5K bytes
    - Viewed (0)
  7. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/BasicDerAdapter.kt

       * ```
       * Point ::= SEQUENCE {
       *   x [0] INTEGER OPTIONAL,
       *   y [1] INTEGER OPTIONAL
       * }
       * ```
       *
       * You may also specify a tag class like [DerHeader.TAG_CLASS_APPLICATION]. The default tag class
       * is [DerHeader.TAG_CLASS_CONTEXT_SPECIFIC].
       *
       * ```
       * Point ::= SEQUENCE {
       *   x [APPLICATION 0] INTEGER OPTIONAL,
       *   y [APPLICATION 1] INTEGER OPTIONAL
       * }
       * ```
       */
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.4K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/OkHttpClient.kt

            this.certificatePinner = certificatePinner
          }
    
        /**
         * Sets the default timeout for complete calls. A value of 0 means no timeout, otherwise values
         * must be between 1 and [Integer.MAX_VALUE] when converted to milliseconds.
         *
         * The call timeout spans the entire call: resolving DNS, connecting, writing the request body,
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 06 04:21:33 GMT 2024
    - 52K bytes
    - Viewed (0)
  9. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/CertificateAdapters.kt

       * ```
       */
      internal val tbsCertificate: BasicDerAdapter<TbsCertificate> =
        Adapters.sequence(
          "TBSCertificate",
          Adapters.INTEGER_AS_LONG
            .withExplicitBox(tag = 0L)
            // v1 == 0.
            .optional(defaultValue = 0),
          Adapters.INTEGER_AS_BIG_INTEGER,
          algorithmIdentifier,
          name,
          validity,
          name,
          subjectPublicKeyInfo,
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 13.6K bytes
    - Viewed (1)
  10. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/Adapters.kt

              override fun encode(
                writer: DerWriter,
                value: Long,
              ) = writer.writeLong(value)
            },
        )
    
      val INTEGER_AS_BIG_INTEGER =
        BasicDerAdapter(
          name = "INTEGER",
          tagClass = DerHeader.TAG_CLASS_UNIVERSAL,
          tag = 2L,
          codec =
            object : BasicDerAdapter.Codec<BigInteger> {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 15K bytes
    - Viewed (0)
Back to top