Companion

Functions

Link copied to clipboard
fun Asn1Element.Companion.parse(source: ByteArray, limit: Long? = null): Asn1Element

Parses the provided source into a single Asn1Element. Consumes all bytes and throws if more than one ASN.1 structure was found or trailing bytes were detected.

Parses the provided source into a single Asn1Element.

Link copied to clipboard

Convenience wrapper around parseAll, taking a ByteArray as source

Parses all ASN.1 elements from source.

Link copied to clipboard

Convenience wrapper around parseFirst, taking a ByteArray as source.

Parses the first ASN.1 element from source.

Link copied to clipboard
fun parseFromDerHexString(derEncoded: String, limit: Long? = null): Asn1Element

Convenience method to directly parse a HEX-string representation of DER-encoded data. Ignores and strips all whitespace.