- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for DerReader (0.11 sec)
-
okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerReader.kt
* show up in ASN.1 streams to also indicate the end of SEQUENCE, SET or other constructed * value. */ private val END_OF_DATA = DerHeader( tagClass = DerHeader.TAG_CLASS_UNIVERSAL, tag = DerHeader.TAG_END_OF_CONTENTS, constructed = false, length = -1L, ) } /** A source that keeps track of how many bytes it's consumed. */
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 10.5K bytes - Viewed (0) -
okhttp-tls/src/test/java/okhttp3/tls/internal/der/DerTest.kt
.write("43054A6F6E6573".decodeHex()) val derReader = DerReader(buffer) derReader.read("test") { header -> assertThat(header.tag).isEqualTo(3L) assertThat(header.tagClass).isEqualTo(DerHeader.TAG_CLASS_APPLICATION) assertThat(derReader.readOctetString()).isEqualTo("Jones".encodeUtf8()) } assertThat(derReader.hasNext()).isFalse() }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 31.7K bytes - Viewed (0) -
okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/Adapters.kt
*/ internal object Adapters { val BOOLEAN = BasicDerAdapter( name = "BOOLEAN", tagClass = DerHeader.TAG_CLASS_UNIVERSAL, tag = 1L, codec = object : BasicDerAdapter.Codec<Boolean> { override fun decode(reader: DerReader): Boolean = reader.readBoolean() override fun encode( writer: DerWriter, value: Boolean,
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/main/kotlin/okhttp3/tls/internal/der/DerAdapter.kt
* * If there's nothing to read and no default value, this will throw an exception. */ fun fromDer(reader: DerReader): T fun fromDer(byteString: ByteString): T { val buffer = Buffer().write(byteString) val reader = DerReader(buffer) return fromDer(reader) } /** * Writes [value] to this adapter, unless it is the default value and can be safely omitted. *
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.2K bytes - Viewed (0) -
okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/BasicDerAdapter.kt
* ``` * * You may also specify a tag class like [DerHeader.TAG_CLASS_APPLICATION]. The default tag class * is [DerHeader.TAG_CLASS_CONTEXT_SPECIFIC]. * * ``` * Point ::= SEQUENCE { * x [APPLICATION 0] INTEGER OPTIONAL, * y [APPLICATION 1] INTEGER OPTIONAL * } * ``` */ fun withTag( tagClass: Int = DerHeader.TAG_CLASS_CONTEXT_SPECIFIC, tag: Long,
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.4K bytes - Viewed (0) -
okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/CertificateAdapters.kt
* > GeneralizedTime. */ internal val time: DerAdapter<Long> = object : DerAdapter<Long> { override fun matches(header: DerHeader): Boolean { return Adapters.UTC_TIME.matches(header) || Adapters.GENERALIZED_TIME.matches(header) } override fun fromDer(reader: DerReader): Long { val peekHeader = reader.peekHeader()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 13.6K bytes - Viewed (0) -
okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerHeader.kt
* limitations under the License. */ package okhttp3.tls.internal.der /** * The first two bytes of each value is a header that includes its tag (field ID) and length. */ internal data class DerHeader( /** * Namespace of the tag. * * This value is encoded in bits 7 and 8 of the first byte of each value. * * ``` * 0b00xxxxxx Universal * 0b01xxxxxx Application
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2.3K bytes - Viewed (0) -
okhttp-tls/src/test/java/okhttp3/tls/internal/der/DerCertificatesTest.kt
Extension( id = SUBJECT_ALTERNATIVE_NAME, critical = false, value = listOf( Adapters.ANY_VALUE to AnyValue( tagClass = DerHeader.TAG_CLASS_CONTEXT_SPECIFIC, tag = 1L, constructed = false, length = 16, bytes = "******@****.***".encodeUtf8(), ), ),
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 43.9K bytes - Viewed (0)