Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages  

lib/md5.h File Reference

More...

#include <sys/types.h>

Go to the source code of this file.

Data Structures

struct  MD5Context
 MD5 private data. More...


Typedefs

typedef unsigned int uint32
typedef struct MD5Context MD5_CTX

Functions

void rpmMD5Init (struct MD5Context *ctx, int brokenEndian)
 Initialize MD5 hash. More...

void rpmMD5Update (struct MD5Context *ctx, unsigned char const *buf, unsigned len)
 Update context to reflect the concatenation of another buffer full. More...

void rpmMD5Final (unsigned char digest[16], struct MD5Context *ctx)
 Return MD5 digest, and reset context. More...

void rpmMD5Transform (uint32 buf[4], uint32 const in[16])
 The core of the MD5 algorithm. More...

int mdfile (const char *fn, unsigned char *digest)
 Return MD5 sum of file as ASCII string. More...

int mdbinfile (const char *fn, unsigned char *bindigest)
 Return MD5 sum of file as binary data. More...

int mdfileBroken (const char *fn, unsigned char *digest)
 Return (broken!) MD5 sum of file as ASCII string. More...

int mdbinfileBroken (const char *fn, unsigned char *bindigest)
 Return (broken!) MD5 sum of file as binary data. More...


Detailed Description

Todo:
Eliminate, use rpmio version instead.

Definition in file md5.h.


Typedef Documentation

typedef struct MD5Context MD5_CTX
 

Definition at line 27 of file md5.h.

typedef unsigned int uint32
 

Definition at line 11 of file md5.h.


Function Documentation

int mdbinfile ( const char * fn,
unsigned char * bindigest )
 

Return MD5 sum of file as binary data.

Parameters:
fn   file name
Return values:
bindigest   MD5 digest
Returns:
0 on success, 1 on error

Definition at line 110 of file md5sum.c.

int mdbinfileBroken ( const char * fn,
unsigned char * bindigest )
 

Return (broken!) MD5 sum of file as binary data.

Deprecated:
Here for compatibility with old (broken) versions of RPM.
Parameters:
fn   file name
Return values:
bindigest   MD5 digest
Returns:
0 on success, 1 on error

Definition at line 114 of file md5sum.c.

int mdfile ( const char * fn,
unsigned char * digest )
 

Return MD5 sum of file as ASCII string.

Parameters:
fn   file name
Return values:
digest   MD5 digest
Returns:
0 on success, 1 on error

Definition at line 118 of file md5sum.c.

int mdfileBroken ( const char * fn,
unsigned char * digest )
 

Return (broken!) MD5 sum of file as ASCII string.

Deprecated:
Here for compatibility with old (broken) versions of RPM.
Parameters:
fn   file name
Return values:
digest   MD5 digest
Returns:
0 on success, 1 on error

Definition at line 122 of file md5sum.c.

void rpmMD5Final ( unsigned char digest[16],
struct MD5Context * ctx )
 

Return MD5 digest, and reset context.

Return values:
MD5   digest
Parameters:
ctx   MD5 private data

Definition at line 128 of file md5.c.

Referenced by domd5().

void rpmMD5Init ( struct MD5Context * ctx,
int brokenEndian )
 

Initialize MD5 hash.

Set bit count to 0 and buffer to mysterious initialization constants.

Parameters:
ctx   MD5 private data
brokenEndian   calculate broken MD5 sum?

Definition at line 52 of file md5.c.

Referenced by domd5().

void rpmMD5Transform ( uint32 buf[4],
uint32 const in[16] )
 

The core of the MD5 algorithm.

This alters an existing MD5 hash to reflect the addition of 16 longwords of new data.

Parameters:
buf   current MD5 variables
in   next block of data to add

Definition at line 191 of file md5.c.

Referenced by rpmMD5Final(), and rpmMD5Update().

void rpmMD5Update ( struct MD5Context * ctx,
unsigned char const * buf,
unsigned len )
 

Update context to reflect the concatenation of another buffer full.

of bytes.

Parameters:
ctx   MD5 private data
data   next data buffer
len   no. bytes of data

Definition at line 77 of file md5.c.

Referenced by domd5().


Generated at Thu Sep 6 11:32:35 2001 for rpm by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001