doDecode

open override fun doDecode(src: Asn1Primitive): Asn1String(source)

Decodes an Asn1Primitive into a specific Asn1String subtype based on its tag.

This generic decoder requires the universal ASN.1 string tag to stay visible. If the value was implicitly tagged, decode it through a concrete subtype decoder such as decodeToUtf8String, decodeToPrintableString, or another specific string decoder.

Return

the corresponding Asn1String subtype Malformed content is preserved and exposed through Asn1String.isValid. Use a concrete subtype decoder when malformed content must be rejected.

Parameters

src

the ASN.1 primitive to decode

Throws

if the tag is unsupported