Back to product page

SetPassword method


Determines if devP2P traffic is encrypted.

Syntax

  • C#
  • C++
  • VB.NET
void devP2P.SetPassword(IntPtr Handle, int encryption, string password);
The SetPassword(Handle,encryption,password) syntax has these parts:
HandleReference to the devP2P instance.
encryptionEncryptions value, defines encryption algorithm.
passwordString with the password. Size depends on selected encryption algorithm.

void SetPassword(Encryptions encryption, char *password);
The SetPassword(encryption,password) syntax has these parts:
encryptionEncryptions value, defines encryption algorithm.
passwordByte array with the password. Size depends on selected encryption algorithm.

Sub P2P_SetPassword(ByVal Handle As IntPtr, ByVal encryption As Integer, ByVal password As String)
The SetPassword(Handle,encryption,password) syntax has these parts:
HandleReference to the devP2P instance.
encryptionEncryptions value, defines encryption algorithm.
passwordString with the password. Size depends on selected encryption algorithm.

Remarks

SetPassword method specifies devP2P to use some encryption algorithm and given password to encrypt all network traffic between two peers. Both sides must choose same encryption, and same passwords, in order for communication to be established.

Besides having secure connection, this also ensures 3rd party does not connect to your devP2P peer, since with wrong password it will not be able to establish connection in the first place.

Platforms

Windows
Mac OSX
Linux
BSD