sign

expect fun sign(key: EcPrivateKey, signatureAlgorithm: Algorithm, message: ByteArray): EcSignature

Signs data with a key.

The signature is DER encoded except for curve Ed25519 and Ed448 where it's just the raw R and S values.

Return

the signature.

Parameters

key

the key to sign with.

signatureAlgorithm

the signature algorithm to use.

message

the data to sign.

actual fun sign(key: <Error class: unknown class>, signatureAlgorithm: <Error class: unknown class>, message: ByteArray): <Error class: unknown class>
actual fun sign(key: EcPrivateKey, signatureAlgorithm: Algorithm, message: ByteArray): EcSignature

Signs data with a key.

Return

the signature.

Parameters

key

the key to sign with.

signatureAlgorithm

the signature algorithm to use.

message

the data to sign.