dispcrypt - encrypt a password, dispatching based on the associated algorithm (Enhanced Security)
Security Library (libsecurity.so)
In order to quickstart a program, the program must be linked as follows:
See the shared library discussion in the Programmer's Guide for more information about using the quickstarting feature.
const char *plaintext,
const char *salt,
The dispcrypt() function applies the specified encryption algorithm to the given password string and salt value, and returns the encrypted form of the password. The return value is static data which is overwritten on subsequent calls to this function or to the encryption algorithms which it calls, so callers should save a copy of the string unless the only use is an immediate comparison during password validation.
This routine returns NULL if there is an encryption failure. Otherwise, it returns a pointer to static data, which is the null-terminated encrypted password result.
passwd(1), getespwent(3), get_num_crypts(3)
Security delim off