- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for writeBitString (0.17 sec)
-
okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerWriter.kt
} val lengthByteCount = (lengthBitCount + 7) / 8 for (shift in (lengthByteCount - 1) * 8 downTo 0 step 8) { sink.writeByte((v shr shift).toInt()) } } fun writeBitString(bitString: BitString) { val sink = sink() sink.writeByte(bitString.unusedBitsCount) sink.write(bitString.byteString) } fun writeOctetString(byteString: ByteString) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 5.7K bytes - Viewed (0) -
okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/Adapters.kt
override fun decode(reader: DerReader): BitString = reader.readBitString() override fun encode( writer: DerWriter, value: BitString, ) = writer.writeBitString(value) }, ) val OCTET_STRING = BasicDerAdapter( name = "OCTET STRING", tagClass = DerHeader.TAG_CLASS_UNIVERSAL, tag = 4L, codec =
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 15K bytes - Viewed (0) -
okhttp-tls/src/test/java/okhttp3/tls/internal/der/DerTest.kt
@Test fun `encode primitive bit string`() { val buffer = Buffer() val derWriter = DerWriter(buffer) derWriter.write("test", tagClass = DerHeader.TAG_CLASS_UNIVERSAL, tag = 3L) { derWriter.writeBitString(BitString("0A3B5F291CD0".decodeHex(), 4)) } assertThat(buffer.readByteString()).isEqualTo("0307040A3B5F291CD0".decodeHex()) } @Test fun `decode primitive string`() { val 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)