Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for writeObjectIdentifier (0.12 sec)

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

      }
    
      fun writeOctetString(byteString: ByteString) {
        sink().write(byteString)
      }
    
      fun writeUtf8(value: String) {
        sink().writeUtf8(value)
      }
    
      fun writeObjectIdentifier(s: String) {
        val utf8 = Buffer().writeUtf8(s)
        val v1 = utf8.readDecimalLong()
        require(utf8.readByte() == '.'.code.toByte())
        val v2 = utf8.readDecimalLong()
        writeVariableLengthLong(v1 * 40 + v2)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  2. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/Adapters.kt

              override fun decode(reader: DerReader): String = reader.readObjectIdentifier()
    
              override fun encode(
                writer: DerWriter,
                value: String,
              ) = writer.writeObjectIdentifier(value)
            },
        )
    
      val UTF8_STRING =
        BasicDerAdapter(
          name = "UTF8",
          tagClass = DerHeader.TAG_CLASS_UNIVERSAL,
          tag = 12L,
          codec =
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 15K bytes
    - Viewed (0)
  3. okhttp-tls/src/test/java/okhttp3/tls/internal/der/DerTest.kt

        val buffer = Buffer()
        val derWriter = DerWriter(buffer)
    
        derWriter.write(
          name = "test",
          tagClass = DerHeader.TAG_CLASS_UNIVERSAL,
          tag = 6L,
        ) {
          derWriter.writeObjectIdentifier("2.999.3")
        }
    
        assertThat(buffer.readByteString()).isEqualTo("0603883703".decodeHex())
      }
    
      @Test fun `decode relative object identifier`() {
        val buffer =
          Buffer()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 31.7K bytes
    - Viewed (0)
Back to top