toCoseAlgorithm

fun SignatureAlgorithm.toCoseAlgorithm(): KmmResult<CoseAlgorithm.Signature>
fun SpecializedSignatureAlgorithm.toCoseAlgorithm(): KmmResult<CoseAlgorithm.Signature>
fun SpecializedDataIntegrityAlgorithm.toCoseAlgorithm(): KmmResult<CoseAlgorithm.DataIntegrity>
fun SpecializedMessageAuthenticationCode.toCoseAlgorithm(): KmmResult<CoseAlgorithm.MAC>

Tries to find a matching COSE algorithm. Note that COSE imposes curve restrictions on ECDSA based on the digest.


fun DataIntegrityAlgorithm.toCoseAlgorithm(): KmmResult<CoseAlgorithm.DataIntegrity>


fun MessageAuthenticationCode.toCoseAlgorithm(): KmmResult<CoseAlgorithm.MAC>

Tries to find a matching COSE algorithm. Note that CoseAlgorithm.MAC.HS256_64 cannot be mapped automatically.


fun SymmetricEncryptionAlgorithm<*, *, *>.toCoseAlgorithm(): KmmResult<CoseAlgorithm.SymmetricEncryption>

Tries to find a matching COSE algorithm. Note that only AES-GCM and ChaCha/Poly are supported.