md4.c File Reference
#include "squid.h"
#include <string.h>
#include "smblib/md4.h"
Include dependency graph for md4.c:

Go to the source code of this file.

Macros

#define ROUND1(a, b, c, d, k, s)   a = lshift(a + F(b,c,d) + X[k], s)
 
#define ROUND2(a, b, c, d, k, s)   a = lshift(a + G(b,c,d) + X[k] + (uint32)0x5A827999,s)
 
#define ROUND3(a, b, c, d, k, s)   a = lshift(a + H(b,c,d) + X[k] + (uint32)0x6ED9EBA1,s)
 

Typedefs

typedef unsigned int uint32
 

Functions

static uint32 F (uint32 X, uint32 Y, uint32 Z)
 
static uint32 G (uint32 X, uint32 Y, uint32 Z)
 
static uint32 H (uint32 X, uint32 Y, uint32 Z)
 
static uint32 lshift (uint32 x, int s)
 
static void mdfour64 (uint32 *M)
 
static void copy64 (uint32 *M, unsigned char *in)
 
static void copy4 (unsigned char *out, uint32 x)
 
void mdfour (unsigned char *out, unsigned char *in, int n)
 

Variables

static uint32 A
 
static uint32 B
 
static uint32 C
 
static uint32 D
 

Macro Definition Documentation

◆ ROUND1

#define ROUND1 (   a,
  b,
  c,
  d,
  k,
 
)    a = lshift(a + F(b,c,d) + X[k], s)

Definition at line 70 of file md4.c.

◆ ROUND2

#define ROUND2 (   a,
  b,
  c,
  d,
  k,
 
)    a = lshift(a + G(b,c,d) + X[k] + (uint32)0x5A827999,s)

Definition at line 71 of file md4.c.

◆ ROUND3

#define ROUND3 (   a,
  b,
  c,
  d,
  k,
 
)    a = lshift(a + H(b,c,d) + X[k] + (uint32)0x6ED9EBA1,s)

Definition at line 72 of file md4.c.

Typedef Documentation

◆ uint32

typedef unsigned int uint32

Definition at line 41 of file md4.c.

Function Documentation

◆ copy4()

static void copy4 ( unsigned char *  out,
uint32  x 
)
static

Definition at line 166 of file md4.c.

Referenced by mdfour().

◆ copy64()

static void copy64 ( uint32 M,
unsigned char *  in 
)
static

Definition at line 156 of file md4.c.

Referenced by mdfour().

◆ F()

◆ G()

static uint32 G ( uint32  X,
uint32  Y,
uint32  Z 
)
static

Definition at line 52 of file md4.c.

◆ H()

static uint32 H ( uint32  X,
uint32  Y,
uint32  Z 
)
static

Definition at line 58 of file md4.c.

Referenced by authDigestNonceEncode().

◆ lshift()

static uint32 lshift ( uint32  x,
int  s 
)
static

Definition at line 64 of file md4.c.

◆ mdfour()

void mdfour ( unsigned char *  out,
unsigned char *  in,
int  n 
)

Definition at line 176 of file md4.c.

References A, B, C, copy4(), copy64(), D, and mdfour64().

Referenced by E_md4hash().

◆ mdfour64()

static void mdfour64 ( uint32 M)
static

Definition at line 76 of file md4.c.

References A, B, C, D, ROUND1, ROUND2, and ROUND3.

Referenced by mdfour().

Variable Documentation

◆ A

◆ B

◆ C

◆ D

uint32 D
static

Definition at line 43 of file md4.c.

Referenced by StatHist::deltaPctile(), mdfour(), and mdfour64().

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors