You can protect password information during authentication using ABL password encoding. To programmatically generate an encoded password:

  1. Use the ENCRYPT-AUDIT-MAC-KEY( ) method of the AUDIT-POLICY system handle to generate an encoded version of a clear-text password using an Encoding prefix.
  2. Assign the encoded password string to a CHARACTER variable.

For example:

DEFINE VARIABLE encpwd AS CHARACTER NO-UNDO.
encpwd = AUDIT-POLICY:ENCRYPT-AUDIT-MAC-KEY("clear_text","ae2h6").
Note: The second parameter of ENCRYPT-AUDIT-MAC-KEY is an encoding prefix. The example uses "ae2h6", but other options are available. See Encoding prefix in Learn about Security and Auditing for more information.

The encoded password, thus generated, can be substituted for a clear-text value in the following contexts:

Note: You can also generate an encoded password using the genpassword utility. This method is useful when you need an encoded password as a startup parameter value on the command line or in a .pf file. For more information, see Password (-P) in the Startup Command and Parameter Reference.