wodSFTP API library - Password Property
      
 

Description

Determines the password to be used with the server.


Return type

A Long value. If successful, 0 is returned, otherwise error as specified here


Syntax

long Sftp_GetPassword(void *Sftp, char *Buffer, int *Bufsize);
long Sftp_SetPassword(void *Sftp, char *newVal);

The Password function syntax has these parts:

Part Description
void *Sftp Handle of the created Sftp instance.
char *Buffer Buffer that will hold the returned string.
int *Bufsize Size of the buffer.

Remarks

You should enter a value here before calling the Connect method if password authentication is used (as it is by default).

If the wrong login/password combination is provided to the remote server, an error will be generated.

If your server requires the keyboard-interactive authentication method, you should set the Authentication property to AuthPassword. wodSFTP will try to authenticate first with the password and then using the keyboard-interactive method. If the keyboard-interactive method requires more than one challenge-response string to be sent, wodSFTP will send the contents of the Password property line-by-line. This means that if you expect more than one requests, you should specify several lines of responses and put them all together in the Password property.

The Bufsize variable should contain the maximum data length that can be stored in the Buffer variable. If you set Bufsize = 0, then the function will return with error ERROR_INSUFFICIENT_BUFFER and Bufsize will contain the required buffer size.