Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for readBitString (0.14 sec)

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

        while (byteCount < limit) {
          result = result shl 8
          result += source.readByte().toInt() and 0xff
        }
        return result
      }
    
      fun readBitString(): BitString {
        if (bytesLeft == -1L || constructed) {
          throw ProtocolException("constructed bit strings not supported for DER")
        }
        if (bytesLeft < 1) {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  2. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/Adapters.kt

          tagClass = DerHeader.TAG_CLASS_UNIVERSAL,
          tag = 3L,
          codec =
            object : BasicDerAdapter.Codec<BitString> {
              override fun decode(reader: DerReader): BitString = reader.readBitString()
    
              override fun encode(
                writer: DerWriter,
                value: BitString,
              ) = writer.writeBitString(value)
            },
        )
    
      val OCTET_STRING =
        BasicDerAdapter(
    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

            .write("0307040A3B5F291CD0".decodeHex())
    
        val derReader = DerReader(buffer)
    
        derReader.read("test") { header ->
          assertThat(header.tag).isEqualTo(3L)
          assertThat(derReader.readBitString()).isEqualTo(BitString("0A3B5F291CD0".decodeHex(), 4))
        }
    
        assertThat(derReader.hasNext()).isFalse()
      }
    
      @Test fun `encode primitive bit string`() {
        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