Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 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)
  3. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerWriter.kt

        }
      }
    
      fun writeBitString(bitString: BitString) {
        val sink = sink()
        sink.writeByte(bitString.unusedBitsCount)
        sink.write(bitString.byteString)
      }
    
      fun writeOctetString(byteString: ByteString) {
        sink().write(byteString)
      }
    
      fun writeUtf8(value: String) {
        sink().writeUtf8(value)
      }
    
      fun writeObjectIdentifier(s: String) {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 5.7K bytes
    - Viewed (0)
Back to top