Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for generatePrivate (0.19 sec)

  1. okhttp-tls/src/test/java/okhttp3/tls/HeldCertificateTest.kt

              "aFjez/MwxFNOHaxc9VgCwYPXCLOtdf7AVovdyG0XWgbUXH+NyxKwboE"
          ).decodeBase64()!!
        val privateKey =
          keyFactory.generatePrivate(
            PKCS8EncodedKeySpec(privateKeyBytes.toByteArray()),
          )
        val heldCertificate =
          HeldCertificate.Builder()
            .keyPair(publicKey, privateKey)
            .commonName("cash.app")
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 22.5K bytes
    - Viewed (0)
  2. okhttp-tls/src/main/kotlin/okhttp3/tls/HeldCertificate.kt

        private fun decodePkcs8(
          data: ByteString,
          keyAlgorithm: String,
        ): PrivateKey {
          try {
            val keyFactory = KeyFactory.getInstance(keyAlgorithm)
            return keyFactory.generatePrivate(PKCS8EncodedKeySpec(data.toByteArray()))
          } catch (e: GeneralSecurityException) {
            throw IllegalArgumentException("failed to decode private key", e)
          }
        }
      }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 21.6K bytes
    - Viewed (0)
  3. okhttp-tls/src/test/java/okhttp3/tls/internal/der/DerCertificatesTest.kt

          )
        val keyFactory = KeyFactory.getInstance("RSA")
        val publicKey = keyFactory.generatePublic(X509EncodedKeySpec(x509PublicKey.toByteArray()))
        val privateKey = keyFactory.generatePrivate(PKCS8EncodedKeySpec(privateKeyBytes.toByteArray()))
    
        val certificate =
          HeldCertificate.Builder()
            .keyPair(publicKey, privateKey)
            .build()
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 43.9K bytes
    - Viewed (0)
Back to top