Asn1IntegerDecimalStringSerializer

String serializer for Asn1Integer.

Intended as a non-DER fallback representation for generic formats such as JSON. When used with the awesn1.kxs DER format, this serializer is bypassed and native INTEGER DER TLV encoding/decoding is used.

Serialization uses Asn1Integer.toDecimalString/Asn1Integer.fromDecimalString. These functions are length limited. The magnitude limit used by this serializer can be overridden using magnitudeLimit. The decoding character budget is derived from it, including room for a sign. This only affects string serialization for non-DER formats. Decimal conversion is quadratic, so this opt-in serializer retains limits that the linear hex fallback does not need.

Properties

Link copied to clipboard
open override val descriptor: SerialDescriptor
Link copied to clipboard

Maximum magnitude size (bytes) for encoding and decoding.

Functions

Link copied to clipboard
open override fun decodeFallback(encoded: String): Asn1Integer
Link copied to clipboard
open override fun deserialize(decoder: Decoder): Asn1Integer
Link copied to clipboard
open fun deserializeFallback(decoder: Decoder): Asn1Integer
Link copied to clipboard
open override fun encodeFallback(value: Asn1Integer): String
Link copied to clipboard
open override fun serialize(encoder: Encoder, value: Asn1Integer)
Link copied to clipboard
open fun serializeFallback(encoder: Encoder, value: Asn1Integer)