Back to product page

Encryption function


Determines the encryption algorithm to be used with SFTP.

Type

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

Syntax

  • C
long Sftp_GetEncryption(void *Sftp,  EncryptionsEnum *pVal);
long Sftp_SetEncryption(void *Sftp,  EncryptionsEnum newVal);
The Encryption(void *Sftp,EncryptionsEnum *pVal, newVal) syntax has these parts:
void *SftpHandle of the created Sftp instance.
EncryptionsEnum *pVal, newValAn EncryptionsEnum enumeration, as described in settings.

Remarks

The settings for value are:

Constant Value Description
encAny0 Anything suitable, selected by wodSFTP component.
encDES 1 DES encryption
enc3DES2 3DES encryption
encAES 3 AES encryption
encBLOWFISH4 BLOWFISH encryption
encAES128 5 AES128 encryption
encAES1926 AES192 encryption
encAES256 7 AES256 encryption
encCAST1288 CAST128 encryption
encAEScbc 9 AES-cbc encryption
encAESctr10 AES-ctr encryption


During the negotiation of a secure connection between wodSFTP and a remote server, setting this property to anything other than encAny indicates that only the specified algorithm may be used for encrypted data transmission. If this property is set to encAny (as it is by default), then any encryption algorithm known to both wodSFTP and the remote server may be used.

wodSFTP's implementation forces selection of encryption algorithms (for the encAny value) in this order:

For SSH2 connections, AES (of any type) will be attempted first. If this fails, TripleDES will be used. If this is not available then Blowfish is selected. If this is also unavailable the connection will be dropped. DES will not be attempted unless you explicitly set the Encryption property to encDES. Most new servers don't support DES due to its lack of security.

Additional encryption methods can be added to wodSFTP on request. If you have a requirement please feel free to send feedback to general@weonlydo.com .

Warning: changing this property also internally changes EncryptionList property.

Platforms

Windows