Standard C Library Functions cryptgensaltimpl(3C)
NAME
cryptgensaltimpl - generate salt for password encryption
SYNOPSIS
#include
char *cryptgensaltimpl(char *gsbuffer, sizet gsbufflen,
const char *oldsalt, const struct passwd *userinfo,
const char **params);
DESCRIPTION
The cryptgensaltimpl() function is called by
cryptgensalt(3C) to generate the salt for password encryp-
tion.
The gsbuffer argument is a pointer to an MT-safe buffer of
size gsbufflen.
The oldsalt and userinfo arguments are passed unchanged from
cryptgensalt(3C).
The params argument is an argv-like null terminated vector
of type char *. The first element of params represents the
mechanism token name from crypt.conf(4). The remaining ele-
ments of params represent strings of the form
[=] to allow passing in additional infor-
mation from the crypt.conf entry, such as specifying rounds
information "rounds=4096".
The value returned by cryptgensaltimpl() points to a
thread-specific buffer to be freed by the caller of
cryptgensalt(3C) after calling crypt(3C).
RETURN VALUES
Upon successful completion, cryptgensaltimpl() returns a
pointer to the new salt. Otherwise a null pointer is
returned and errno is set to indicate the error.
ERORS
The cryptgensaltimpl() function will fail if:
EINVAL The configuration file crypt.conf contains an
invalid entry.
ELIBAC The required crypt shared library was not found.
SunOS 5.11 Last change: 10 Jun 2002 1
Standard C Library Functions cryptgensaltimpl(3C)
ENOMEM There is insufficient memory to perform hashing.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Evolving
MT-Level MT-Safe
SEE ALSO
passwd(1), crypt(3C), cryptgenhashimpl(3C),
cryptgensalt(3C), getpassphrase(3C), crypt.conf(4),
passwd(4), attributes(5)
SunOS 5.11 Last change: 10 Jun 2002 2
|