get Public Key
fun getPublicKey(algorithmName: String, privateKeyData: String, passphrase: String?): AuthPublicKey(source)
Extract the AuthPublicKey from a private key for use with AuthHandler.onPublicKeysNeeded.
Return
The corresponding public key for probing
Parameters
algorithm Name
SSH algorithm name (e.g., "ssh-ed25519", "rsa-sha2-256")
private Key Data
PEM or OpenSSH private key contents
passphrase
Key passphrase, or null if unencrypted
fun getPublicKey(algorithmName: String, privateKeyData: ByteArray, passphrase: String?): AuthPublicKey(source)
Extract the AuthPublicKey from a private key for use with AuthHandler.onPublicKeysNeeded.
Return
The corresponding public key for probing
Parameters
algorithm Name
SSH algorithm name (e.g., "ssh-ed25519", "rsa-sha2-256")
private Key Data
PEM or OpenSSH private key contents as bytes
passphrase
Key passphrase, or null if unencrypted