|
@@ -79,7 +79,8 @@
|
|
#include <stdio.h>
|
|
#include <stdio.h>
|
|
#include <crypt.h>
|
|
#include <crypt.h>
|
|
#include <sys/cdefs.h>
|
|
#include <sys/cdefs.h>
|
|
-
|
|
|
|
|
|
+#include "libcrypt.h"
|
|
|
|
+
|
|
/* MD5 context. */
|
|
/* MD5 context. */
|
|
struct MD5Context {
|
|
struct MD5Context {
|
|
u_int32_t state[4]; /* state (ABCD) */
|
|
u_int32_t state[4]; /* state (ABCD) */
|
|
@@ -100,14 +101,6 @@ static const unsigned char __md5_itoa64[] = /* 0 ... 63 => ascii - 64 */
|
|
"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
|
"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
|
|
|
|
|
|
|
|
|
-/* shut up gcc-4.x signed warnings */
|
|
|
|
-#define strcpy(dst,src) strcpy((char*)dst,(char*)src)
|
|
|
|
-#define strlen(s) strlen((char*)s)
|
|
|
|
-#define strncat(dst,src,n) strncat((char*)dst,(char*)src,n)
|
|
|
|
-#define strncmp(s1,s2,n) strncmp((char*)s1,(char*)s2,n)
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
#ifdef i386
|
|
#ifdef i386
|
|
#define __md5_Encode memcpy
|
|
#define __md5_Encode memcpy
|
|
#define __md5_Decode memcpy
|
|
#define __md5_Decode memcpy
|
|
@@ -538,8 +531,7 @@ static void __md5_to64( char *s, unsigned long v, int n)
|
|
* Use MD5 for what it is best at...
|
|
* Use MD5 for what it is best at...
|
|
*/
|
|
*/
|
|
|
|
|
|
-char * __md5_crypt( const unsigned char *pw, const unsigned char *salt) attribute_hidden;
|
|
|
|
-char * __md5_crypt( const unsigned char *pw, const unsigned char *salt)
|
|
|
|
|
|
+char *__md5_crypt(const unsigned char *pw, const unsigned char *salt)
|
|
{
|
|
{
|
|
/* Static stuff */
|
|
/* Static stuff */
|
|
static const unsigned char *sp, *ep;
|
|
static const unsigned char *sp, *ep;
|