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

◆ uchar

#define uchar   unsigned char

Definition at line 50 of file smbencrypt.c.

Function Documentation

◆ _my_mbstowcs()

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

Definition at line 98 of file smbencrypt.c.

References SSVAL.

Referenced by E_md4hash().

◆ _my_wcslen()

static int _my_wcslen ( int16_t *  str)
static

Definition at line 82 of file smbencrypt.c.

Referenced by E_md4hash().

◆ E_md4hash() [1/2]

void E_md4hash ( uchar passwd,
uchar p16 
)

Definition at line 119 of file smbencrypt.c.

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

◆ E_md4hash() [2/2]

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

Referenced by nt_lm_owf_gen(), and SMBNTencrypt().

◆ nt_lm_owf_gen()

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.

◆ SMBencrypt()

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().

◆ SMBNTencrypt()

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().

◆ StrnCpy()

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().

◆ strupper()

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