decodeFromSource

inline fun <T> Der.decodeFromSource(source: Source, limit: Long = configuration.maxInputLength): T(source)

Decodes a DER value from source using the inferred deserializer for T.

limit is the per-call maximum number of encoded DER bytes to consume. It defaults to and cannot exceed DerConfiguration.maxInputLength, whose default is the target's ByteArray ceiling. The effective limit is enforced before reading or peeking from source.

Throws

SerializationException

if the input does not parse as DER or violates descriptor/tag/nullability constraints.


fun <T> Der.decodeFromSource(deserializer: DeserializationStrategy<T>, source: Source, limit: Long = configuration.maxInputLength): T(source)

Decodes a DER value from source using deserializer.

limit is the per-call maximum number of encoded DER bytes to consume. It defaults to and cannot exceed DerConfiguration.maxInputLength, whose default is the target's ByteArray ceiling. The effective limit is enforced before reading or peeking from source.

Throws

SerializationException

if the input does not parse as DER or violates descriptor/tag/nullability constraints.