Package-level declarations

Types

Link copied to clipboard
interface Buffer : Source<Buffer> , Sink
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
class ByteArraySource(data: ByteArray, index: Int = 0, size: Int = data.size) : Source<ByteArraySink>
Link copied to clipboard
interface Sink
Link copied to clipboard
interface Source<S : Sink>

Functions

Link copied to clipboard

Decodes an ASN.1 unsigned varint to a Asn1Integer, copying all bytes from the source into a ByteArray.

Link copied to clipboard

Decodes an ASN.1 unsigned varint to an UInt, copying all bytes from the source into a ByteArray.

Link copied to clipboard

Decodes an ASN.1 unsigned varint to an ULong, copying all bytes from the source into a ByteArray.

Link copied to clipboard
fun <A : Asn1Element, T : Asn1Encodable<A>> Asn1Decodable<A, T>.decodeFromDer(src: Source<*>, assertTag: Asn1Element.Tag? = null): T
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Decodes a single Asn1Element from this source.

Link copied to clipboard
Link copied to clipboard

Reads all parsable ASN.1 elements from this source.

Link copied to clipboard

Consumes exactly nBytes from this source and interprets it as a signed Int

Link copied to clipboard

Consumes exactly nBytes from this source and interprets it as a Long.

Link copied to clipboard

Consumes exactly nBytes remaining data from this source and interprets it as a UInt

Link copied to clipboard

Consumes exactly nBytes from this source and interprets it as a signed ULong.

Link copied to clipboard
inline fun Source<*>.readUByte(): UByte
Link copied to clipboard

Encodes this number using varint encoding as used within ASN.1: groups of seven bits are encoded into a byte, while the highest bit indicates if more bytes are to come

Link copied to clipboard

Encodes a positive Long to a minimum-size unsigned byte array, omitting the leading zero

Link copied to clipboard

Writes a signed long using twos-complement encoding using the fewest bytes required

Link copied to clipboard

Encodes an unsigned Int to a minimum-size twos-complement byte array

Link copied to clipboard

Encodes an unsigned Long to a minimum-size twos-complement byte array

Link copied to clipboard
inline fun Sink.writeUByte(uByte: UByte)