Apache HTTPD
Macros | Functions | Variables
apr_md4.c File Reference
#include "apr_strings.h"
#include "apr_md4.h"
#include "apr_lib.h"
#include "apr_crypto.h"

Go to the source code of this file.

Macros

#define S11   3
 
#define S12   7
 
#define S13   11
 
#define S14   19
 
#define S21   3
 
#define S22   5
 
#define S23   9
 
#define S24   13
 
#define S31   3
 
#define S32   9
 
#define S33   11
 
#define S34   15
 
#define F(x, y, z)   (((x) & (y)) | ((~x) & (z)))
 
#define G(x, y, z)   (((x) & (y)) | ((x) & (z)) | ((y) & (z)))
 
#define H(x, y, z)   ((x) ^ (y) ^ (z))
 
#define ROTATE_LEFT(x, n)   (((x) << (n)) | ((x) >> (32-(n))))
 
#define FF(a, b, c, d, x, s)
 
#define GG(a, b, c, d, x, s)
 
#define HH(a, b, c, d, x, s)
 

Functions

static void MD4Transform (apr_uint32_t state[4], const unsigned char block[64])
 
static void Encode (unsigned char *output, const apr_uint32_t *input, unsigned int len)
 
static void Decode (apr_uint32_t *output, const unsigned char *input, unsigned int len)
 
 APU_DECLARE (apr_status_t)
 

Variables

static unsigned char PADDING [64]
 

Macro Definition Documentation

◆ F

#define F (   x,
  y,
  z 
)    (((x) & (y)) | ((~x) & (z)))

Definition at line 88 of file apr_md4.c.

◆ FF

#define FF (   a,
  b,
  c,
  d,
  x,
  s 
)
Value:
{ \
(a) += F ((b), (c), (d)) + (x); \
(a) = ROTATE_LEFT ((a), (s)); \
}
#define ROTATE_LEFT(x, n)
Definition apr_md4.c:94
#define F(x, y, z)
Definition apr_md4.c:88
apr_size_t const unsigned char unsigned int unsigned int d
Definition apr_siphash.h:72
apr_bucket apr_bucket_brigade * a
apr_vformatter_buff_t * c
Definition apr_lib.h:175
apr_pool_t * b
Definition apr_pools.h:529
const char * s
Definition apr_strings.h:95

Definition at line 99 of file apr_md4.c.

◆ G

#define G (   x,
  y,
  z 
)    (((x) & (y)) | ((x) & (z)) | ((y) & (z)))

Definition at line 89 of file apr_md4.c.

◆ GG

#define GG (   a,
  b,
  c,
  d,
  x,
  s 
)
Value:
{ \
(a) += G ((b), (c), (d)) + (x) + (apr_uint32_t)0x5a827999; \
(a) = ROTATE_LEFT ((a), (s)); \
}
#define G(x, y, z)
Definition apr_md4.c:89
apr_size_t size

Definition at line 103 of file apr_md4.c.

◆ H

#define H (   x,
  y,
  z 
)    ((x) ^ (y) ^ (z))

Definition at line 90 of file apr_md4.c.

◆ HH

#define HH (   a,
  b,
  c,
  d,
  x,
  s 
)
Value:
{ \
(a) += H ((b), (c), (d)) + (x) + (apr_uint32_t)0x6ed9eba1; \
(a) = ROTATE_LEFT ((a), (s)); \
}
#define H(x, y, z)
Definition apr_md4.c:90

Definition at line 107 of file apr_md4.c.

◆ ROTATE_LEFT

#define ROTATE_LEFT (   x,
  n 
)    (((x) << (n)) | ((x) >> (32-(n))))

Definition at line 94 of file apr_md4.c.

◆ S11

#define S11   3

Definition at line 56 of file apr_md4.c.

◆ S12

#define S12   7

Definition at line 57 of file apr_md4.c.

◆ S13

#define S13   11

Definition at line 58 of file apr_md4.c.

◆ S14

#define S14   19

Definition at line 59 of file apr_md4.c.

◆ S21

#define S21   3

Definition at line 60 of file apr_md4.c.

◆ S22

#define S22   5

Definition at line 61 of file apr_md4.c.

◆ S23

#define S23   9

Definition at line 62 of file apr_md4.c.

◆ S24

#define S24   13

Definition at line 63 of file apr_md4.c.

◆ S31

#define S31   3

Definition at line 64 of file apr_md4.c.

◆ S32

#define S32   9

Definition at line 65 of file apr_md4.c.

◆ S33

#define S33   11

Definition at line 66 of file apr_md4.c.

◆ S34

#define S34   15

Definition at line 67 of file apr_md4.c.

Function Documentation

◆ APU_DECLARE()

APU_DECLARE ( int  )

Most DBM libraries take a POSIX mode for creating files. Don't trust the mode_t type, some platforms may not support it, int is safe.

< Shared lock. More than one process or thread can hold a shared lock at any given time. Essentially, this is a "read lock", preventing writers from establishing an exclusive lock.

Definition at line 114 of file apr_md4.c.

◆ Decode()

static void Decode ( apr_uint32_t output,
const unsigned char input,
unsigned int  len 
)
static

Definition at line 391 of file apr_md4.c.

◆ Encode()

static void Encode ( unsigned char output,
const apr_uint32_t input,
unsigned int  len 
)
static

Definition at line 373 of file apr_md4.c.

◆ MD4Transform()

static void MD4Transform ( apr_uint32_t  state[4],
const unsigned char  block[64] 
)
static

Definition at line 296 of file apr_md4.c.

Variable Documentation

◆ PADDING

unsigned char PADDING[64]
static
Initial value:
=
{
0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}

Definition at line 75 of file apr_md4.c.