toCoseEncoded

open override fun toCoseEncoded(): ByteArray

Encodes the signature for use in COSE or JWT.

For EC signatures, this produces the IEEE P1363 (r || s) encoding. For RSA signatures, this produces the raw RSA signature bytes.