summaryrefslogtreecommitdiffstats
path: root/libcrypt/crypt.c
diff options
context:
space:
mode:
Diffstat (limited to 'libcrypt/crypt.c')
-rw-r--r--libcrypt/crypt.c26
1 files changed, 5 insertions, 21 deletions
diff --git a/libcrypt/crypt.c b/libcrypt/crypt.c
index 027aa5a4d..57181dc61 100644
--- a/libcrypt/crypt.c
+++ b/libcrypt/crypt.c
@@ -25,32 +25,16 @@
#include <crypt.h>
#include <unistd.h>
-/* For use by the old, non-reentrant routines (crypt/encrypt/setkey) */
-static struct crypt_data __crypt_data;
-extern char * __md5_crypt_r( const char *pw, const char *salt, struct crypt_data * data);
-extern char * __des_crypt_r( const char *pw, const char *salt, struct crypt_data * data);
+extern char * __md5_crypt( const char *pw, const char *salt);
+extern char * __des_crypt( const char *pw, const char *salt);
extern char * crypt(const char *key, const char *salt)
{
- return crypt_r (key, salt, &__crypt_data);
-}
-
-extern void setkey(const char *key)
-{
- setkey_r(key, &__crypt_data);
-}
-
-extern void encrypt(char *block, int edflag)
-{
- encrypt_r(block, edflag, &__crypt_data);
-}
-
-extern char *crypt_r(const char *pw, const char *salt, struct crypt_data *data)
-{
/* First, check if we are supposed to be using the MD5 replacement
* instead of DES... */
if (salt[0]=='$' && salt[1]=='1' && salt[2]=='$')
- return __md5_crypt_r(pw, salt, data);
+ return __md5_crypt(key, salt);
else
- return __des_crypt_r(pw, salt, data);
+ return __des_crypt(key, salt);
}
+