2 .\" Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH CRYPT_GENHASH_IMPL 3C "Jun 10, 2002"
8 crypt_genhash_impl \- generate encrypted password
14 \fBchar *\fR\fBcrypt_genhash_impl\fR(\fBchar *\fR\fIctbuffer\fR, \fBsize_t\fR \fIctbufflen\fR,
15 \fBconst char *\fR\fIplaintext\fR, \fBconst char *\fR\fIsalt\fR, \fBconst char **\fR\fIparams\fR);
21 The \fBcrypt_genhash_impl()\fR function is called by \fBcrypt\fR(3C) to
22 generate the encrypted password \fIplaintext\fR.
25 The \fIctbuffer\fR argument is a pointer to an MT-safe buffer of
26 \fIctbufflen\fR size that is used to return the result.
29 The \fIsalt\fR argument is the salt used in encoding.
32 The \fIparams\fR argument is an \fIargv\fR-like null-terminated vector of type
33 \fBchar *\fR. The first element of \fIparams\fR represents the mechanism token
34 name from \fBcrypt.conf\fR(4). The remaining elements of \fIparams\fR represent
35 strings of the form <\fBparameter\fR>[=<\fBvalue\fR>] to allow passing in
36 additional information from the \fBcrypt.conf\fR entry, such as specifing
37 rounds information "\fBrounds=4096\fR".
40 The \fBcrypt_genhash_impl()\fR function must not \fBfree\fR(3C) \fIctbufflen\fR
45 Upon successful completion, \fBcrypt_genhash_impl()\fR returns a pointer to the
46 encoded version of \fIplaintext\fR. Otherwise a null pointer is returned and
47 \fBerrno\fR is set to indicate the error.
51 The \fBcrypt_genhash_impl()\fR function will fail if:
58 The configuration file \fBcrypt.conf\fR contains an invalid entry.
67 The required shared library was not found.
76 There is insufficient memory to perform hashing.
82 See \fBattributes\fR(5) for descriptions of the following attributes:
90 ATTRIBUTE TYPE ATTRIBUTE VALUE
92 Interface Stability Evolving
100 \fBpasswd\fR(1), \fBcrypt\fR(3C), \fBcrypt_gensalt_impl\fR(3C), \fBfree\fR(3C),
101 \fBgetpassphrase\fR(3C), \fBcrypt.conf\fR(4), \fBpasswd\fR(4),