The newly created credential object.
username to use to authenticate
The bytes of the public key.
The length of the public key in bytes.
The callback method to sign the data during the challenge.
Additional data to pass to the callback.
0 for success or an error code for failure
Create an ssh key credential with a custom signing function.
This lets you use your own function to sign the challenge.
This function and its credential type is provided for completeness and wraps libssh2_userauth_publickey(), which is undocumented.
The supplied credential parameter will be internally duplicated.