crypt(3c) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

crypt(3c)

crypt(3C)                Standard C Library Functions                crypt(3C)

NAME
       crypt - password hashing function

SYNOPSIS
       #include <crypt.h>

       char *crypt(const char *key, const char *salt);

   Standard conforming
       #include <unistd.h>

       char *crypt(const char *key, const char *salt);

DESCRIPTION
       The  crypt()  function  generates  ASCII  strings representing a hashed
       value of the input, suitable for use as password entries  in  shadow(5)
       files  or other name services databases. It generates the password hash
       given the key and salt.


       The key argument is the plain text password to be hashed.


       If the first character of salt is "$", crypt()  uses  crypt.conf(5)  to
       determine which shared module to load for the encryption algorithm. The
       algorithm  name  crypt() uses to search in crypt.conf is the string be‐
       tween the first and second "$", or between the first "$" and first  ","
       if a "," comes before the second "$".


       If  the  first character of salt is not "$", the algorithm described on
       crypt_unix(7) is used.

RETURN VALUES
       Upon successful completion, crypt() returns a pointer  to  the  encoded
       string.  Otherwise it returns a null pointer and sets errno to indicate
       the error.


       The return value points to static data  that  is  overwritten  by  each
       call.  The  return  value  is at most CRYPT_MAXCIPHERTEXTLEN characters
       long.

ERRORS
       The crypt() function will fail if:

       EINVAL     An entry in crypt.conf is invalid.


       ELIBACC    The required shared library was not found.


       ENOMEM     There is insufficient memory to generate the hash.


       ENOSYS     The functionality is not supported on this system.


USAGE
       The values returned by this function might not be portable among  stan‐
       dard-conforming systems. See standards(7).


       Applications  should  not use crypt() to store or verify user passwords
       but should use the functions described on pam(3PAM) instead.

ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:

       tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE  TYPEAT‐
       TRIBUTE  VALUE _ Interface StabilityCommitted _ MT-LevelMT-Safe _ Stan‐
       dardSee standards(7).


SEE ALSO
       passwd(1),   pwhash(1),   crypt_genhash_impl(3C),    crypt_gensalt(3C),
       crypt_gensalt_impl(3C),  getpassphrase(3C),  pam(3PAM),  crypt.conf(5),
       passwd(5),  policy.conf(5),  shadow(5),  attributes(7),  crypt_unix(7),
       standards(7), account-policy(8S)

HISTORY
       The crypt() function has been included in all releases of SunOS and So‐
       laris.


       Support  for  password  hashing  algorithms beyond the traditional UNIX
       crypt(), via the crypt.conf(5) configuration, was added to  Solaris  in
       Solaris 9 12/02 (Update 2).

Oracle Solaris 11.4               21 Jun 2021                        crypt(3C)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3