Specify whether or not network password encryption is to be used when logging into Adaptive Server Enterprise.
RETCODE DBSETLENCRYPT(loginrec, enable) LOGINREC *loginrec; DBBOOL enable;
A pointer to a LOGINREC structure, which will be passed as an argument to dbopen. You can allocate a LOGINREC structure by calling dblogin.
A boolean value (“true” or “false”) specifying whether or not the server should request an encrypted password at login time.
SUCCEED or FAIL.
DBSETLENCRYPT specifies whether or not network password encryption is to be used when logging into Adaptive Server Enterprise. If an application does not call DBSETLENCRYPT, password encryption is not used.
Network password encryption provides a protected mechanism for authenticating a user’s identity.
If an application specifies that network password encryption is to be used, then when the application attempts to open a connection:
No password is sent with the initial connection request. At this time, the client indicates to the server that encryption is desired.
The server replies to the connection request with an encryption key.
DB-Library uses the key to encrypt the user’s password and remote passwords, if any, and sends the encrypted passwords back to the server.
The server uses the key to decrypt the encrypted passwords and either accepts or rejects the login attempt.
If password encryption is not specified, then when an application attempts to open a connection:
A password is included with the connection request.
The server either accepts or rejects the login attempt.