| Skip Navigation Links | |
| Exit Print View | |
![]() | man pages section 3: Basic Library Functions Oracle Solaris 11 Information Library |
enable_extended_FILE_stdio(3C)
posix_spawnattr_getschedparam(3C)
posix_spawnattr_getschedpolicy(3C)
posix_spawnattr_getsigdefault(3C)
posix_spawnattr_getsigignore_np(3C)
posix_spawnattr_getsigmask(3C)
posix_spawnattr_setschedparam(3C)
posix_spawnattr_setschedpolicy(3C)
posix_spawnattr_setsigdefault(3C)
posix_spawnattr_setsigignore_np(3C)
posix_spawnattr_setsigmask(3C)
posix_spawn_file_actions_addclose(3C)
posix_spawn_file_actions_addclosefrom_np(3C)
posix_spawn_file_actions_adddup2(3C)
posix_spawn_file_actions_addopen(3C)
posix_spawn_file_actions_destroy(3C)
posix_spawn_file_actions_init(3C)
pthread_attr_getdetachstate(3C)
pthread_attr_getinheritsched(3C)
pthread_attr_getschedparam(3C)
pthread_attr_getschedpolicy(3C)
pthread_attr_setdetachstate(3C)
pthread_attr_setinheritsched(3C)
pthread_attr_setschedparam(3C)
pthread_attr_setschedpolicy(3C)
pthread_barrierattr_destroy(3C)
pthread_barrierattr_getpshared(3C)
pthread_barrierattr_setpshared(3C)
pthread_condattr_getpshared(3C)
pthread_condattr_setpshared(3C)
pthread_cond_reltimedwait_np(3C)
pthread_key_create_once_np(3C)
pthread_mutexattr_getprioceiling(3C)
pthread_mutexattr_getprotocol(3C)
pthread_mutexattr_getpshared(3C)
pthread_mutexattr_getrobust(3C)
pthread_mutexattr_setprioceiling(3C)
pthread_mutexattr_setprotocol(3C)
pthread_mutexattr_setpshared(3C)
pthread_mutexattr_setrobust(3C)
pthread_mutex_getprioceiling(3C)
pthread_mutex_reltimedlock_np(3C)
pthread_mutex_setprioceiling(3C)
pthread_rwlockattr_destroy(3C)
pthread_rwlockattr_getpshared(3C)
pthread_rwlockattr_setpshared(3C)
pthread_rwlock_reltimedrdlock_np(3C)
pthread_rwlock_reltimedwrlock_np(3C)
pthread_rwlock_timedrdlock(3C)
pthread_rwlock_timedwrlock(3C)
rctlblk_get_enforced_value(3C)
- string encoding function
#include <crypt.h>char *crypt(const char *key,const char *salt);
#include <unistd.h>char *crypt(const char *key,const char *salt);
Thecrypt() function encodes strings suitable for secure storage as passwords. It generatesthe password hash given thekey andsalt.
Thekey argument is the plain text password to be encrypted.
If the first character ofsalt is “$”,crypt() usescrypt.conf(4) todetermine which shared module to load for the encryption algorithm. The algorithmnamecrypt() uses to search incrypt.conf is the string between thefirst and second “$”, or between the first “$” and first “,”if a “,” comes before the second “$”.
If the first character ofsalt is not “$”, the algorithm describedoncrypt_unix(5) is used.
Upon successful completion,crypt() returns a pointer to the encoded string. Otherwiseit returns a null pointer and setserrno to indicate the error.
The return value points to static data that is overwritten by eachcall.
Thecrypt() function will fail if:
An entry incrypt.conf is invalid.
The required shared library was not found.
There is insufficient memory to generate the hash.
The functionality is not supported on this system.
The values returned by this function might not be portable among standard-conformingsystems. Seestandards(5).
Applications should not usecrypt() to store or verify user passwords butshould use the functions described onpam(3PAM) instead.
Seeattributes(5) for descriptions of the following attributes:
|
passwd(1),crypt_genhash_impl(3C),crypt_gensalt(3C),crypt_gensalt_impl(3C),getpassphrase(3C),pam(3PAM),passwd(4),policy.conf(4),attributes(5),crypt_unix(5),standards(5)
Copyright © 2011, Oracle and/or its affiliates. All rights reserved.Legal Notices | ![]() ![]() |