Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
smbencrypt.c File Reference
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/fs.h>
#include <linux/string.h>
#include <linux/kernel.h>
#include <linux/random.h>
#include "cifs_unicode.h"
#include "cifspdu.h"
#include "cifsglob.h"
#include "cifs_debug.h"
#include "cifsproto.h"

Go to the source code of this file.

Macros

#define false   0
 
#define true   1
 
#define CVAL(buf, pos)   (((unsigned char *)(buf))[pos])
 
#define SSVALX(buf, pos, val)   (CVAL(buf,pos)=(val)&0xFF,CVAL(buf,pos+1)=(val)>>8)
 
#define SSVAL(buf, pos, val)   SSVALX((buf),(pos),((__u16)(val)))
 

Functions

int mdfour (unsigned char *md4_hash, unsigned char *link_str, int link_len)
 
int SMBencrypt (unsigned char *passwd, const unsigned char *c8, unsigned char *p24)
 
int E_md4hash (const unsigned char *passwd, unsigned char *p16, const struct nls_table *codepage)
 
int SMBNTencrypt (unsigned char *passwd, unsigned char *c8, unsigned char *p24, const struct nls_table *codepage)
 

Macro Definition Documentation

#define CVAL (   buf,
  pos 
)    (((unsigned char *)(buf))[pos])

Definition at line 46 of file smbencrypt.c.

#define false   0

Definition at line 39 of file smbencrypt.c.

#define SSVAL (   buf,
  pos,
  val 
)    SSVALX((buf),(pos),((__u16)(val)))

Definition at line 48 of file smbencrypt.c.

#define SSVALX (   buf,
  pos,
  val 
)    (CVAL(buf,pos)=(val)&0xFF,CVAL(buf,pos+1)=(val)>>8)

Definition at line 47 of file smbencrypt.c.

#define true   1

Definition at line 42 of file smbencrypt.c.

Function Documentation

int E_md4hash ( const unsigned char passwd,
unsigned char p16,
const struct nls_table codepage 
)

Definition at line 207 of file smbencrypt.c.

int mdfour ( unsigned char md4_hash,
unsigned char link_str,
int  link_len 
)

Definition at line 132 of file smbencrypt.c.

int SMBencrypt ( unsigned char passwd,
const unsigned char c8,
unsigned char p24 
)

Definition at line 182 of file smbencrypt.c.

int SMBNTencrypt ( unsigned char passwd,
unsigned char c8,
unsigned char p24,
const struct nls_table codepage 
)

Definition at line 230 of file smbencrypt.c.