smbencrypt.c File Reference
#include "squid.h"
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <dirent.h>
#include <ctype.h>
#include "smblib/smblib-priv.h"
#include "rfcnb/byteorder.h"
#include "smblib/md4.h"
#include "smblib/smbdes.h"
#include "smblib/smbencrypt.h"
Include dependency graph for smbencrypt.c:

Go to the source code of this file.

Macros

#define uchar   unsigned char
 

Functions

static void E_md4hash (unsigned char *passwd, unsigned char *p16)
 
static char * StrnCpy (char *dest, char *src, int n)
 
static void strupper (char *s)
 
void SMBencrypt (uchar *passwd, uchar *c8, uchar *p24)
 
static int _my_wcslen (int16_t *str)
 
static int _my_mbstowcs (int16_t *dst, uchar *src, int len)
 
void E_md4hash (uchar *passwd, uchar *p16)
 
void SMBNTencrypt (uchar *passwd, uchar *c8, uchar *p24)
 
void nt_lm_owf_gen (char *pwd, char *nt_p16, char *p16)
 

Macro Definition Documentation

#define uchar   unsigned char

Definition at line 50 of file smbencrypt.c.

Referenced by nt_lm_owf_gen(), SMB_Logon_Server(), SMBencrypt(), and SMBNTencrypt().

Function Documentation

static int _my_mbstowcs ( int16_t *  dst,
uchar src,
int  len 
)
static

Definition at line 98 of file smbencrypt.c.

References i, len, and SSVAL.

Referenced by E_md4hash().

static int _my_wcslen ( int16_t *  str)
static

Definition at line 82 of file smbencrypt.c.

References len.

Referenced by E_md4hash().

static void E_md4hash ( unsigned char *  passwd,
unsigned char *  p16 
)
static

Referenced by nt_lm_owf_gen(), and SMBNTencrypt().

void E_md4hash ( uchar passwd,
uchar p16 
)

Definition at line 119 of file smbencrypt.c.

References _my_mbstowcs(), _my_wcslen(), len, and mdfour().

void nt_lm_owf_gen ( char *  pwd,
char *  nt_p16,
char *  p16 
)

Definition at line 153 of file smbencrypt.c.

References E_md4hash(), E_P16(), StrnCpy(), strupper(), and uchar.

void SMBencrypt ( uchar passwd,
uchar c8,
uchar p24 
)

Definition at line 67 of file smbencrypt.c.

References E_P16(), E_P24(), StrnCpy(), strupper(), and uchar.

Referenced by init_challenge(), and SMB_Logon_Server().

void SMBNTencrypt ( uchar passwd,
uchar c8,
uchar p24 
)

Definition at line 140 of file smbencrypt.c.

References E_md4hash(), E_P24(), and uchar.

Referenced by init_challenge().

char * StrnCpy ( char *  dest,
char *  src,
int  n 
)
static

Definition at line 179 of file smbencrypt.c.

References NULL.

Referenced by nt_lm_owf_gen(), and SMBencrypt().

void strupper ( char *  s)
static

Definition at line 194 of file smbencrypt.c.

Referenced by nt_lm_owf_gen(), and SMBencrypt().

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors