sign
suspend fun Crypto.sign(key: PrivateKey, signatureAlgorithm: Algorithm, message: ByteArray): Signature
Signs data with a private key.
Return
the signature.
Parameters
key
the private key to sign with.
signatureAlgorithm
the signature algorithm to use.
message
the data to sign.
Throws
if the key cannot sign or algorithm is incompatible.