signWithKeyPair

fun signWithKeyPair(algorithmName: String, keyPair: KeyPair, dataToSign: ByteArray): ByteArray(source)

Sign authentication data using a JCA KeyPair.

Return

SSH-encoded signature blob

Parameters

algorithmName

SSH signature algorithm (e.g., "ssh-ed25519", "rsa-sha2-256")

keyPair

JCA key pair containing the private key

dataToSign

The data to sign (as provided by AuthHandler.onSignatureRequest)