Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for writeOctetString (0.08 sec)

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

      @Test fun `encode primitive string`() {
        val buffer = Buffer()
        val derWriter = DerWriter(buffer)
    
        derWriter.write("test", tagClass = DerHeader.TAG_CLASS_UNIVERSAL, tag = 26L) {
          derWriter.writeOctetString("Jones".encodeUtf8())
        }
    
        assertThat(buffer.readByteString()).isEqualTo("1A054A6F6E6573".decodeHex())
      }
    
      @Test fun `decode implicit prefixed type`() {
        // Type1 ::= VisibleString
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 31.7K bytes
    - Viewed (0)
  2. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/Adapters.kt

              override fun decode(reader: DerReader): ByteString = reader.readOctetString()
    
              override fun encode(
                writer: DerWriter,
                value: ByteString,
              ) = writer.writeOctetString(value)
            },
        )
    
      val NULL =
        BasicDerAdapter(
          name = "NULL",
          tagClass = DerHeader.TAG_CLASS_UNIVERSAL,
          tag = 5L,
          codec =
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 15K bytes
    - Viewed (0)
Back to top