To enable password encryption, you must set the EncryptPassword connection property, which specifies whether the password is transmitted in encrypted format. When password encryption is enabled, the password is sent over the wire only after a login is negotiated; the password is first encrypted and then sent. The EncryptPassword values are:
0 – use plain text password. This is the default value.
1 – use encrypted password. If it is not supported, return an error message.
2 – use encrypted password. If it is not supported, use plain text password.
To use asymmetrical encryption, you require a server that supports this type of encryption, such as Adaptive Server 15.0.2.
In this example, sapass
is
not sent over the wire until a login is negotiated and the password
is encrypted and sent.
AseConnection.ConnectionString= ”Data Source=MANGO;" + "Port = 5000;" + "Database=pubs2;" + "UID=sa;" + "PWD=sapass;" + "EncryptPassword=1;”;