signMlDsa

suspend fun signMlDsa(message: ByteArray): MlDsaSignature

Convenience method to sign message when this is an ML-DSA key.

Return

the signature.

Parameters

message

the data to sign.

Throws

if the key is not an ML-DSA key.

if the signature algorithm isn't compatible with the key.

if the key needs unlocking.

if the key is no longer usable.