1crypt_gensalt_impl(3C)   Standard C Library Functions   crypt_gensalt_impl(3C)
2
3
4

NAME

6       crypt_gensalt_impl - generate salt for password encryption
7

SYNOPSIS

9       #include <crypt.h>
10
11       char *crypt_gensalt_impl(char *gsbuffer, size_t gsbufflen,
12            const char *oldsalt, const struct passwd *userinfo,
13            const char **params);
14
15

DESCRIPTION

17       The  crypt_gensalt_impl()  function  is  called by crypt_gensalt(3C) to
18       generate the salt for password encryption.
19
20
21       The gsbuffer argument is a pointer to an MT-safe buffer of size  gsbuf‐
22       flen.
23
24
25       The oldsalt and userinfo arguments are passed unchanged from crypt_gen‐
26       salt(3C).
27
28
29       The params argument is an argv-like null terminated vector of type char
30       *. The first element of params represents the mechanism token name from
31       crypt.conf(4). The remaining elements of params  represent  strings  of
32       the  form <parameter>[=<value>] to allow passing in additional informa‐
33       tion from the crypt.conf entry, such as specifying  rounds  information
34       "rounds=4096".
35
36
37       The  value returned by crypt_gensalt_impl() points to a thread-specific
38       buffer to be freed by the caller  of  crypt_gensalt(3C)  after  calling
39       crypt(3C).
40

RETURN VALUES

42       Upon  successful  completion, crypt_gensalt_impl() returns a pointer to
43       the new salt. Otherwise a null pointer is returned and errno is set  to
44       indicate the error.
45

ERRORS

47       The crypt_gensalt_impl() function will fail if:
48
49       EINVAL     The configuration file crypt.conf contains an invalid entry.
50
51
52       ELIBACC    The required crypt shared library was not found.
53
54
55       ENOMEM     There is insufficient memory to perform hashing.
56
57

ATTRIBUTES

59       See attributes(5) for descriptions of the following attributes:
60
61
62
63
64       ┌─────────────────────────────┬─────────────────────────────┐
65       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
66       ├─────────────────────────────┼─────────────────────────────┤
67       │Interface Stability          │Evolving                     │
68       ├─────────────────────────────┼─────────────────────────────┤
69       │MT-Level                     │MT-Safe                      │
70       └─────────────────────────────┴─────────────────────────────┘
71

SEE ALSO

73       passwd(1),  crypt(3C),  crypt_genhash_impl(3C), crypt_gensalt(3C), get‐
74       passphrase(3C), crypt.conf(4), passwd(4), attributes(5)
75
76
77
78SunOS 5.11                        10 Jun 2002           crypt_gensalt_impl(3C)
Impressum