encode Public Key
Encode a KeyPair's public key to an AuthPublicKey for use with AuthHandler.onPublicKeysNeeded.
The SSH algorithm name is inferred from the key type (e.g., Ed25519 → "ssh-ed25519", RSA → "ssh-rsa"). For RSA keys that need a specific signature algorithm like "rsa-sha2-256", construct the AuthPublicKey with the desired algorithm name using the returned blob.
Return
The corresponding AuthPublicKey
Parameters
key Pair
JCA key pair