The Interface to the Password Module

The interface to dfhucryp.dll (Windows) or dfhucryp.so (UNIX) is a standard call interface, requiring a single parameter:

CALL "DFHUCRYP" USING CRYPT-PARAMETER-AREA.
 01  CRYPT-PARAMETER-AREA.
     05  CRYPT-FUNCTION                PIC XX COMP-X.
         88  CRYPT-ENCRYPT-88             VALUE 1.
         88  CRYPT-DECRYPT-88             VALUE 2.
     05  CRYPT-RESULT                  PIC XX COMP-X.
         88 CRYPT-SUCCESSFUL-88           VALUE 0.
         88 CRYPT-FAILED-88               VALUE 1.
     05  CRYPT-USER-ID                 PIC XX(8).
     05  CRYPT-ENCRYPTED-PASSWORD      PIC XX(8).
     05  CRYPT-DECRYPTED-PASSWORD      PIC XX(8).

where:

CRYPT-FUNCTION Specifies the function as encrypt (=1) or decrypt (=2).

The encrypt function takes the decrypted password as input and outputs the encrypted password, possibly referring to the user ID field.

The decrypt function takes the encrypted password as input and outputs the decrypted password, possibly referring to the user ID field.

CRYPT-RESULT This field is used to signal the success (=0) or failure (=1) of the function. Since a failure is treated as a password mismatch in all validation functions, the error return can be used to screen out unacceptable passwords during the SNT update process.
CRYPT-USER-ID The user ID associated with the password being encrypted or decrypted.
CRYPT-ENCRYPTED-PASSWORD The encrypted password. This field is used as an input field by the decrypt function and as an output field by the encrypt function.
CRYPT-DECRYPTED-PASSWORD The decrypted password. This field is used as an output field by the decrypt function and as an input field by the encrypt function.