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

lib/md5sum.c File Reference

Generate/check MD5 Message Digests. More...

#include "system.h"
#include "md5.h"
#include "rpmio_internal.h"
#include "debug.h"

Go to the source code of this file.

Functions

int domd5 (const char *fn, unsigned char *digest, int asAscii, int brokenEndian)
 Calculate MD5 sum for file. More...

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

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

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


Detailed Description

Generate/check MD5 Message Digests.

Compile and link with md5.c. If you don't have getopt() in your library also include getopt.c. For MSDOS you can also link with the wildcard initialization function (wildargs.obj for Turbo C and setargv.obj for MSC) so that you can use wildcards on the commandline.

Written March 1993 by Branko Lankester Modified June 1993 by Colin Plumb for altered md5.c. Modified October 1995 by Erik Troan for RPM

Definition in file md5sum.c.


Function Documentation

int domd5 ( const char * fn,
unsigned char * digest,
int asAscii,
int brokenEndian ) [static]
 

Calculate MD5 sum for file.

Parameters:
fn   file name
Return values:
digest   address of md5sum
Parameters:
asAscii   return md5sum as ascii string?
brokenEndian   calculate broken MD5 sum?
Returns:
0 on success, 1 on error

Definition at line 27 of file md5sum.c.

Referenced by mdbinfile(), mdbinfileBroken(), mdfile(), and mdfileBroken().

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.

Referenced by rpmAddSignature().

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 )
 

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.

Referenced by decideFileFate(), and rpmVerifyFile().


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