Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 26 for Integer (0.22 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 May 03 11:42:14 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 May 03 11:42:14 GMT 2024
    - Last Modified: Tue Apr 02 01:44:15 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  3. 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 May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.4K bytes
    - Viewed (0)
  4. 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 May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 03 03:04:50 GMT 2024
    - 8.5K bytes
    - Viewed (0)
  5. 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 May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.4K bytes
    - Viewed (0)
  6. 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 May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 13.6K bytes
    - Viewed (1)
  7. 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 May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 15K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/http2/Settings.kt

      }
    
      /** Returns the value for the setting `id`, or 0 if unset. */
      operator fun get(id: Int): Int = values[id]
    
      /** Returns the number of settings that have values assigned. */
      fun size(): Int = Integer.bitCount(set)
    
      // TODO: honor this setting.
      fun getEnablePush(defaultValue: Boolean): Boolean {
        val bit = 1 shl ENABLE_PUSH
        return if (bit and set != 0) values[ENABLE_PUSH] == 1 else defaultValue
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/WebPlatformUrlTest.kt

          return
        }
    
        assertThat(url, "Expected URL to parse successfully, but was null")
          .isNotNull()
        val effectivePort =
          when {
            url!!.port != defaultPort(url.scheme) -> Integer.toString(url.port)
            else -> ""
          }
        val effectiveQuery =
          when {
            url.encodedQuery != null -> "?" + url.encodedQuery
            else -> ""
          }
        val effectiveFragment =
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.7K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/-UtilJvm.kt

      require(millis <= Integer.MAX_VALUE) { "$name too large" }
      require(millis != 0L || duration <= 0L) { "$name too small" }
      return millis.toInt()
    }
    
    internal fun checkDuration(
      name: String,
      duration: Duration,
    ): Int {
      check(!duration.isNegative()) { "$name < 0" }
      val millis = duration.inWholeMilliseconds
      require(millis <= Integer.MAX_VALUE) { "$name too large" }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 09 12:33:05 GMT 2024
    - 10.5K bytes
    - Viewed (0)
Back to top