NotRawByteEncodable

This is the opposite of a RawByteEncodable signature

This inverse "non-trait" is required to group CryptoSignature subtypes which cannot be encoded into raw byte arrays, since not all properties required to do so are known. For example, EC signatures parsed from an X509Certificate do not specify a curve. For signatures obtained this way, it is impossible to know how the components should be padded before encoding it into raw bytes.

The reason this interface exists, is that it allows for grouping all such signatures in the same manner as the RawByteEncodable ones, to allow for exhaustive when clauses

Inheritors

Properties

Link copied to clipboard
Link copied to clipboard

In Java EC signatures are returned as DER-encoded, RSA signatures however are raw bytearrays

Link copied to clipboard
abstract val signature: Asn1Element

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 fun encodeToDerSafe(): KmmResult<ByteArray>

Safe version of encodeToDer, wrapping the result into a KmmResult

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

Encodes the implementing object into an A

Link copied to clipboard
Link copied to clipboard

Exception-free version of encodeToTlv

Link copied to clipboard
open fun encodeToTlvSafe(): KmmResult<Asn1Element>

Safe version of encodeToTlv, wrapping the result into a KmmResult