Emulex Logo
OneCoreā„¢ Storage SDK Release 11.2
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ocs_md5.c File Reference
#include "ocs_os.h"
#include "ocs_md5.h"

Go to the source code of this file.

Detailed Description

Implements the standard MD5 routines.

Definition in file ocs_md5.c.

Macros

#define F1(x, y, z)   (z ^ (x & (y ^ z)))
 
#define F2(x, y, z)   F1(z, x, y)
 
#define F3(x, y, z)   (x ^ y ^ z)
 
#define F4(x, y, z)   (y ^ (x | ~z))
 
#define MD5STEP(f, w, x, y, z, in, s)   (w += f(x,y,z) + in, w = (w<<s | w>>(32-s)) + x)
 

Functions

static void ocs_md5transform (uint32_t buf[4], uint32_t const in[16])
 
void ocs_md5_init (ocs_md5_ctx_t *ctx)
 
void ocs_md5_update (ocs_md5_ctx_t *ctx, md5byte const *buf, unsigned len)
 
void ocs_md5_final (md5byte digest[16], ocs_md5_ctx_t *ctx)
 

Macro Details

#define F1 (   x,
  y,
  z 
)    (z ^ (x & (y ^ z)))

Definition at line 166 of file ocs_md5.c.

#define F2 (   x,
  y,
  z 
)    F1(z, x, y)

Definition at line 167 of file ocs_md5.c.

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

Definition at line 168 of file ocs_md5.c.

#define F4 (   x,
  y,
  z 
)    (y ^ (x | ~z))

Definition at line 169 of file ocs_md5.c.

#define MD5STEP (   f,
  w,
  x,
  y,
  z,
  in,
  s 
)    (w += f(x,y,z) + in, w = (w<<s | w>>(32-s)) + x)

Definition at line 172 of file ocs_md5.c.

Function Details

void ocs_md5_final ( md5byte  digest[16],
ocs_md5_ctx_t *  ctx 
)

Definition at line 132 of file ocs_md5.c.

void ocs_md5_init ( ocs_md5_ctx_t *  ctx)

Definition at line 70 of file ocs_md5.c.

void ocs_md5_update ( ocs_md5_ctx_t *  ctx,
md5byte const *  buf,
unsigned  len 
)

Definition at line 90 of file ocs_md5.c.

void ocs_md5transform ( uint32_t  buf[4],
uint32_t const  in[16] 
)
static

Definition at line 181 of file ocs_md5.c.