[Swan] From Linux Fedora 18 crypt man - Issue with threads
Philippe Vouters
philippe.vouters at laposte.net
Thu Mar 7 08:02:11 EET 2013
#define _XOPEN_SOURCE /* See feature_test_macros(7) */
#include <unistd.h>
char *crypt(const char *key, const char *salt);
#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <crypt.h>
char *crypt_r(const char *key, const char *salt,
struct crypt_data *data);
Link with -lcrypt.
...
crypt_r() is a reentrant version of crypt(). The structure
pointed to
by data is used to store result data and bookkeeping
information.
Other than allocating it, the only thing that the caller should
do with
this structure is to set data->initialized to zero before
the first
call to crypt_r().
--
Philippe Vouters (Fontainebleau/France)
URL: http://vouters.dyndns.org/
SIP: sip:Vouters at sip.linphone.org
More information about the Swan
mailing list