decodeAsn1VarBigInt

fun Source.decodeAsn1VarBigInt(): Pair<BigInteger, ByteArray>(source)

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

Return

the decoded BigInteger and the underlying varint-encoded bytes as ByteArray


Decodes an unsigned BigInteger from bytes 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. Trailing bytes are ignored.

Return

the decoded unsigned BigInteger and the underlying varint-encoded bytes as ByteArray