append

fun <Serializable> Asn1TreeBuilder.append(serializer: KSerializer<Serializable>, value: Serializable, der: Der)(source)

Encodes value with serializer and der, then appends the resulting TLV element.

If the configured DER encoding omits value, such as a nullable null when explicit nulls are disabled, nothing is appended.

Throws

SerializationException

if serialization constraints are violated


Encodes value with its inferred serializer and der, then appends the resulting TLV element.

The serializer is inferred from the static type T, which must have an available kotlinx serializer.

Throws

SerializationException

if serialization constraints are violated