Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for PrivateKeyInfo (0.28 sec)

  1. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/CertificateAdapters.kt

       *   ...,
       *   [[2: publicKey        [1] PublicKey OPTIONAL ]],
       *   ...
       * }
       *
       * PrivateKeyInfo ::= OneAsymmetricKey
       * ```
       */
      internal val privateKeyInfo: BasicDerAdapter<PrivateKeyInfo> =
        Adapters.sequence(
          "PrivateKeyInfo",
          Adapters.INTEGER_AS_LONG,
          algorithmIdentifier,
          Adapters.OCTET_STRING,
          decompose = {
            listOf(
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  2. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/Certificate.kt

      val maxIntermediateCas: Long?,
    )
    
    /** A private key. Note that this class doesn't support attributes or an embedded public key. */
    internal data class PrivateKeyInfo(
      // v1(0), v2(1).
      val version: Long,
      val algorithmIdentifier: AlgorithmIdentifier,
      val privateKey: ByteString,
    ) {
      // Avoid Long.hashCode(long) which isn't available on Android 5.
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  3. okhttp-tls/src/test/java/okhttp3/tls/internal/der/DerCertificatesTest.kt

            .decodeBase64()!!
    
        val decoded = CertificateAdapters.privateKeyInfo.fromDer(privateKeyInfoByteString)
    
        assertThat(decoded.version).isEqualTo(0L)
        assertThat(decoded.algorithmIdentifier).isEqualTo(AlgorithmIdentifier(RSA_ENCRYPTION, null))
        assertThat(decoded.privateKey.size).isEqualTo(607)
    
        val encoded = CertificateAdapters.privateKeyInfo.toDer(decoded)
        assertThat(encoded).isEqualTo(privateKeyInfoByteString)
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 43.9K bytes
    - Viewed (0)
  4. okhttp-tls/src/main/kotlin/okhttp3/tls/HeldCertificate.kt

          encodeBase64Lines(pkcs1Bytes())
          append("-----END RSA PRIVATE KEY-----\n")
        }
      }
    
      private fun pkcs1Bytes(): ByteString {
        val decoded = CertificateAdapters.privateKeyInfo.fromDer(keyPair.private.encoded.toByteString())
        return decoded.privateKey
      }
    
      /** Build a held certificate with reasonable defaults. */
      class Builder {
        private var notBefore = -1L
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 21.6K bytes
    - Viewed (0)
Back to top