IA5

@Serializable(with = Asn1Ia5StringSerializer::class)
class IA5 : Asn1String(source)

IA5 STRING.

The IA5 alphabet is the International Reference Alphabet (ITU-T T.50 / ISO 646): the full 7-bit range 0x000x7F, including DELETE (0x7F). isValid accepts every code point <= 0x7F.

Constructors

Link copied to clipboard
constructor(value: String)

Properties

Link copied to clipboard
open override val isValid: Boolean

true iff every character of value is in the 7-bit IA5 range 0x000x7F.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val tag: ULong
Link copied to clipboard

Always the UTF-8 interpretation of rawValue. The decoding is performed via String.decodeFromAsn1ContentBytes(rawValue), which internally uses the standard library's ByteArray.decodeToString.

Functions

Link copied to clipboard

Convenience function to directly get the DER-encoded representation of the implementing object

Link copied to clipboard

Exception-free version of encodeToDer

Link copied to clipboard
open override fun encodeToTlv(): Asn1Primitive

Encodes the implementing object into an A

Link copied to clipboard
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard

shorthand for Asn1Element.prettyPrint, hence, a call to this function encodes this encodable to an Asn1Element, holds it in memory, pretty prints it, and discards it. This characteristic may be relevant in memory-constrained environments.

Link copied to clipboard
fun Asn1Encodable<*>.toDerHexString(lineLen: Int? = null): String
Link copied to clipboard

Creates a new implicitly tagged ASN.1 Element from this ASN.1 Element. NOTE: The TagClass of the provided tag will be used! If you want the result to have TagClass.CONTEXT_SPECIFIC, also invoke tag withClass TagClass.CONTEXT_SPECIFIC!. If a CONSTRUCTED Tag is applied to an ASN.1 Primitive, the CONSTRUCTED bit is overridden and set to zero

Creates a new implicitly tagged ASN.1 Element from this ASN.1 Structure. If the provided template's tagClass is not set, the class of the resulting structure defaults to TagClass.CONTEXT_SPECIFIC. If a CONSTRUCTED Tag is applied to an ASN.1 Primitive, the CONSTRUCTED bit is overridden and set to zero

open infix fun withImplicitTag(tagValue: ULong): Asn1Element

Creates a new implicitly tagged ASN.1 Element from this ASN.1 Element. Sets the class of the resulting structure to TagClass.CONTEXT_SPECIFIC