NCBI C++ ToolKit
Macros | Functions
md4.c File Reference
#include <config.h>
#include <freetds/tds.h>
#include <freetds/bytes.h>
#include "md4.h"
+ Include dependency graph for md4.c:

Go to the source code of this file.

Go to the SVN repository for this file.

Macros

#define word32   TDS_UINT
 
#define byteReverse(buf, len)   /* Nothing */
 
#define rotl32(x, n)   (((x) << ((word32)(n))) | ((x) >> (32 - (word32)(n))))
 
#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 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 (TDS_UINT buf[4], TDS_UINT const in[16])
 
void MD4Init (struct MD4Context *ctx)
 
void MD4Update (struct MD4Context *ctx, unsigned char const *buf, size_t len)
 
void MD4Final (struct MD4Context *ctx, unsigned char *digest)
 

Macro Definition Documentation

◆ byteReverse

#define byteReverse (   buf,
  len 
)    /* Nothing */

Definition at line 50 of file md4.c.

◆ F

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

Definition at line 178 of file md4.c.

◆ FF

#define FF (   a,
  b,
  c,
  d,
  x,
 
)
Value:
{ \
(a) += F ((b), (c), (d)) + (x); \
(a) = rotl32 ((a), (s)); \
}
#define rotl32(x, n)
Definition: md4.c:65
#define F(x, y, z)
Definition: md4.c:178
unsigned int a
Definition: ncbi_localip.c:102

Definition at line 182 of file md4.c.

◆ G

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

Definition at line 179 of file md4.c.

◆ GG

#define GG (   a,
  b,
  c,
  d,
  x,
 
)
Value:
{ \
(a) += G ((b), (c), (d)) + (x) + (word32)0x5a827999; \
(a) = rotl32 ((a), (s)); \
}
#define word32
Definition: md4.c:47
#define G(x, y, z)
Definition: md4.c:179

Definition at line 186 of file md4.c.

◆ H

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

Definition at line 180 of file md4.c.

◆ HH

#define HH (   a,
  b,
  c,
  d,
  x,
 
)
Value:
{ \
(a) += H ((b), (c), (d)) + (x) + (word32)0x6ed9eba1; \
(a) = rotl32 ((a), (s)); \
}
#define H(x, y, z)
Definition: md4.c:180

Definition at line 190 of file md4.c.

◆ rotl32

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

Definition at line 65 of file md4.c.

◆ word32

#define word32   TDS_UINT

Definition at line 47 of file md4.c.

Function Documentation

◆ MD4Final()

void MD4Final ( struct MD4Context ctx,
unsigned char *  digest 
)

Definition at line 133 of file md4.c.

References byteReverse, ctx, MD4Transform(), NULL, TDS_PUT_UA4, and word32.

◆ MD4Init()

void MD4Init ( struct MD4Context ctx)

Definition at line 73 of file md4.c.

References ctx.

◆ MD4Transform()

static void MD4Transform ( TDS_UINT  buf[4],
TDS_UINT const  in[16] 
)
static

Definition at line 200 of file md4.c.

References a, b, buf, FF, GG, HH, in(), and word32.

Referenced by MD4Final(), and MD4Update().

◆ MD4Update()

void MD4Update ( struct MD4Context ctx,
unsigned char const buf,
size_t  len 
)

Definition at line 88 of file md4.c.

References buf, byteReverse, ctx, if(), len, MD4Transform(), t, and word32.

Modified on Wed Jun 19 17:02:04 2024 by modify_doxy.py rev. 669887