PASSWD ====== The executable and DLL in this directory can be used to generate passwords from cleartext for Serv-U. The DLL also provides password verification services. There is also an OCX version of this, to be used with Visual Basic. The OCX comes with its own DLL in a separate zip-file. See PASSOCX.ZIP for this version. This document describes how PASSWD should be used, the command line and the DLL interfaces. PASSWD.EXE ---------- This is a 32-bit Win32 console application which reads one line from 'stdin', encrypts it, and writes the result to 'stdout'. You can test it by simply starting it in a DOS box: Each line you type gets encrypted. To use it in another program or script you should redirect the input/output. Worst case it is of course possible to use temporary files for passing the info, like 'passwd < in.txt > out.txt'. PASSWD.DLL PASSWD.H PASSWD.LIB ---------- This is a 32-bit DLL providing encryption using 'crypt()' to encrypt passwords. The function definitions which are provided in PASSWD.H are: char* CALLBACK MakePassword(char* ClearText); WORD CALLBACK CheckPassword(char* ClearText,char* EncrPwd); char* CALLBACK Crypt(char* ClearText,char* Salt); MakePassword: The input parameter 'ClearText' is the password which should be encrypted. A pointer to the result is returned, pointing to a static text area which remains valid until the next call. CheckPassword: Two pointers are passed to it, one with the password in clear text form, the other pointing to the encrypted password. The function returns 0 if the two do not match, or 1 if they match (ie. in case the password was correct). Crypt: This is a 'raw' interface to the 'crypt()' function, compatible with UNIX crypt. The PASSWD.LIB file should be linked to the program using the the password DLL, unless the functions are bound at run time internally.