Asn1TagVerifyingDecodable

Functions

Link copied to clipboard
open fun decodeFromDer(src: ByteArray): T

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

open fun decodeFromDer(src: ByteArray, tagOverride: UByte?): T

Same as Asn1Decodable.decodeFromDer, but allows overriding the tag, should the implementing class verify it. Useful for implicit tagging.

Link copied to clipboard

Exception-free version of decodeFromDer

open fun decodeFromDerOrNull(src: ByteArray, tagOverride: UByte?): T?

Exception-free version of decodeFromDer

Link copied to clipboard
open fun decodeFromDerSafe(src: ByteArray): KmmResult<T>

Safe version of decodeFromDer, wrapping the result into a KmmResult

open fun decodeFromDerSafe(src: ByteArray, tagOverride: UByte?): KmmResult<T>

Safe version of decodeFromDer, wrapping the result into a KmmResult

Link copied to clipboard
abstract fun decodeFromTlv(src: Asn1Primitive): T

Processes an A, parsing it into an instance of T

abstract fun decodeFromTlv(src: Asn1Primitive, tagOverride: UByte?): T

Same as Asn1Decodable.decodeFromTlv, but allows overriding the tag, should the implementing class verify it. Useful for implicit tagging, in which case you will want to call at.asitplus.signum.indispensable.asn1.DERTags.toImplicitTag on tagOverride.

Link copied to clipboard

Exception-free version of decodeFromTlv

open fun decodeFromTlvOrNull(src: Asn1Primitive, tagOverride: UByte?): T?

Exception-free version of decodeFromTlv

Link copied to clipboard
open fun decodeFromTlvSafe(src: Asn1Primitive): KmmResult<T>

Safe version of decodeFromTlv, wrapping the result into a KmmResult

open fun decodeFromTlvSafe(src: Asn1Primitive, tagOverride: UByte?): KmmResult<T>

Safe version of decodeFromTlv, wrapping the result into a KmmResult