Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

Decodes a Asn1Integer from bytes assuming the same encoding as the Asn1Primitive.content property of an Asn1Primitive containing an ASN.1 INTEGER

Link copied to clipboard
open fun decodeFromDer(src: ByteArray, assertTag: Asn1Element.Tag? = null): Asn1Integer

Convenience method, directly DER-decoding a byte array to T

Link copied to clipboard
open fun decodeFromDerOrNull(src: ByteArray, assertTag: Asn1Element.Tag? = null): Asn1Integer?

Exception-free version of decodeFromDer

Link copied to clipboard
open fun decodeFromDerSafe(src: ByteArray, assertTag: Asn1Element.Tag? = null): KmmResult<Asn1Integer>

Safe version of decodeFromDer, wrapping the result into a KmmResult

Link copied to clipboard
open fun decodeFromTlv(src: Asn1Primitive, assertTag: Asn1Element.Tag? = null): Asn1Integer

Processes an A, parsing it into an instance of T

Link copied to clipboard
open fun decodeFromTlvOrNull(src: Asn1Primitive, assertTag: Asn1Element.Tag? = null): Asn1Integer?

Exception-free version of decodeFromTlv

Link copied to clipboard
open fun decodeFromTlvSafe(src: Asn1Primitive, assertTag: Asn1Element.Tag? = null): KmmResult<Asn1Integer>

Safe version of decodeFromTlv, wrapping the result into a KmmResult

Link copied to clipboard
open override fun doDecode(src: Asn1Primitive): Asn1Integer

Actual element-specific decoding function. By default, this is invoked after verifyTag

Link copied to clipboard

Constructs an Asn1Integer from its sign-magnitude representation

Link copied to clipboard

Constructs an Asn1Integer from a decimal string

Link copied to clipboard

Constructs an Asn1Integer from its twos-complement byte representation

Link copied to clipboard

Constructs a non-negative Asn1Integer from its unsigned magnitude representation

Link copied to clipboard
open fun verifyTag(src: Asn1Primitive, assertTag: Asn1Element.Tag?)

Specify assertTag for verifying implicitly tagged elements' tags (and better not override this function).