37#include <sys/socket.h>
38#include <netinet/in.h>
50#define uchar unsigned char
58static void E_md4hash(
unsigned char *passwd,
unsigned char *p16);
59static char *
StrnCpy(
char *dest,
char *src,
int n);
69 uchar p14[15], p21[21];
71 memset(p21,
'\0', 21);
72 memset(p14,
'\0', 14);
73 StrnCpy((
char *) p14, (
char *) passwd, 14);
103 for (i = 0; i < len; i++) {
125 len = strlen((
char *) passwd);
134 mdfour(p16, (
unsigned char *) wpwd, len);
144 memset(p21,
'\0', 21);
156 StrnCpy(passwd, pwd,
sizeof(passwd) - 1);
159 memset(nt_p16,
'\0', 16);
168 memset(p16,
'\0', 16);
172 memset(passwd, 0,
sizeof(passwd));
188 while (n-- && (*d++ = *src++));
197 if (islower((
int)(
unsigned char)*s))
198 *s = toupper((
int)(
unsigned char)*s);
#define SSVAL(buf, pos, val)
void mdfour(unsigned char *out, unsigned char *in, int n)
void E_P24(unsigned char *p21, unsigned char *c8, unsigned char *p24)
void E_P16(unsigned char *p14, unsigned char *p16)
void SMBNTencrypt(uchar *passwd, uchar *c8, uchar *p24)
void nt_lm_owf_gen(char *pwd, char *nt_p16, char *p16)
static int _my_mbstowcs(int16_t *dst, uchar *src, int len)
static void strupper(char *s)
static char * StrnCpy(char *dest, char *src, int n)
static int _my_wcslen(int16_t *str)
static void E_md4hash(unsigned char *passwd, unsigned char *p16)
void SMBencrypt(uchar *passwd, uchar *c8, uchar *p24)