RawByteEncodable

Well-defined CryptoSignatures, which can also be encoded to raw bytes, in addition to the DER encoding specified in the X.509 profile. RSA Signatures and EC Signatures with a known curve fall into this category.

This is the opposite of a NotRawByteEncodable signature

Inheritors

Properties

Link copied to clipboard
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 rawByteArray: ByteArray

Removes ASN1 Structure and returns the signature value(s) as ByteArray

Link copied to clipboard
val CryptoSignature.x509Encoded: Asn1Primitive

Signature encoded as per X.509:

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun encodeToDerSafe(): KmmResult<ByteArray>
Link copied to clipboard
abstract fun encodeToTlv(): Asn1Element
Link copied to clipboard
open fun encodeToTlvOrNull(): Asn1Element?
Link copied to clipboard
open fun encodeToTlvSafe(): KmmResult<Asn1Element>
Link copied to clipboard
Link copied to clipboard
open infix fun withImplicitTag(tag: Asn1Element.Tag): Asn1Element
open infix fun withImplicitTag(template: Asn1Element.Tag.Template): Asn1Element
open infix fun withImplicitTag(tagValue: ULong): Asn1Element