parseFirst
fun Asn1Element.Companion.parseFirst(source: ByteArray, limit: Long? = null): Pair<Asn1Element, ByteArray>(source)
Convenience wrapper around parseFirst, taking a ByteArray as source.
Return
a pair of the first parsed Asn1Element mapped to the remaining bytes
Parameters
limit
the maximum allowed total number of encoded DER bytes to consume. This limit is enforced before reading or peeking from the underlying source.