Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for readOctetString (0.08 sec)

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

          assertThat(header.tag).isEqualTo(26L)
          assertThat(header.constructed).isFalse()
          assertThat(header.tagClass).isEqualTo(DerHeader.TAG_CLASS_UNIVERSAL)
          assertThat(derReader.readOctetString()).isEqualTo("Jones".encodeUtf8())
        }
    
        assertThat(derReader.hasNext()).isFalse()
      }
    
      @Test fun `encode primitive string`() {
        val buffer = Buffer()
        val derWriter = DerWriter(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)
  2. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerReader.kt

        }
        val unusedBitCount = source.readByte().toInt() and 0xff
        val byteString = source.readByteString(bytesLeft)
        return BitString(byteString, unusedBitCount)
      }
    
      fun readOctetString(): ByteString {
        if (bytesLeft == -1L || constructed) {
          throw ProtocolException("constructed octet strings not supported for DER")
        }
        return source.readByteString(bytesLeft)
      }
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  3. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/Adapters.kt

          tagClass = DerHeader.TAG_CLASS_UNIVERSAL,
          tag = 4L,
          codec =
            object : BasicDerAdapter.Codec<ByteString> {
              override fun decode(reader: DerReader): ByteString = reader.readOctetString()
    
              override fun encode(
                writer: DerWriter,
                value: ByteString,
              ) = writer.writeOctetString(value)
            },
        )
    
      val NULL =
    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