123456789101112131415161718192021 |
- #define __FORCE_GLIBC
- #include <crypt.h>
- #include <unistd.h>
- #include "libcrypt.h"
- char *crypt(const char *key, const char *salt)
- {
-
- if (salt[0]=='$' && salt[1]=='1' && salt[2]=='$')
- return __md5_crypt((unsigned char*)key, (unsigned char*)salt);
- else
- return __des_crypt((unsigned char*)key, (unsigned char*)salt);
- }
|