library: libCore
#include "TMD5.h"

TMD5


class description - header file - source file
viewCVS header - viewCVS source

class TMD5

Inheritance Inherited Members Includes Libraries
Class Charts

Function Members (Methods)

Display options:
Show inherited
Show non-public
public:
TMD5()
TMD5(const UChar_t* digest)
TMD5(const TMD5& md5)
virtual~TMD5()
const char*AsString() const
static TClass*Class()
static TMD5*FileChecksum(const char* file)
static Int_tFileChecksum(const char* file, UChar_t* digest)
voidFinal()
voidFinal(UChar_t* digest)
virtual TClass*IsA() const
TMD5&operator=(const TMD5& rhs)
voidPrint() const
static TMD5*ReadChecksum(const char* file)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
voidUpdate(const UChar_t* buf, UInt_t len)
static Int_tWriteChecksum(const char* file, const TMD5* md5)
private:
voidDecode(UInt_t* out, const UChar_t* in, UInt_t len)
voidEncode(UChar_t* out, const UInt_t* in, UInt_t len)
voidTransform(UInt_t* buf, const UChar_t* in)

Data Members

private:
UInt_tfBuf[4]!temp buffer
UInt_tfBits[2]!temp buffer
UChar_tfIn[64]!temp buffer
UChar_tfDigest[16]message digest
Bool_tfFinalizedtrue if message digest has been finalized

Class Description

                                                                      
 TMD5                                                                 
                                                                      
 This code implements the MD5 message-digest algorithm.               
 The algorithm is due to Ron Rivest. This code was                    
 written by Colin Plumb in 1993, no copyright is claimed.             
 This code is in the public domain; do with it what you wish.         
                                                                      
 Equivalent code is available from RSA Data Security, Inc.            
 This code has been tested against that, and is equivalent,           
 except that you don't need to include two pages of legalese          
 with every copy.                                                     
                                                                      
 To compute the message digest of a chunk of bytes, create an         
 TMD5 object, call Update() as needed on buffers full of bytes, and   
 then call Final(), which will, optionally, fill a supplied 16-byte   
 array with the  digest.                                              
                                                                      

TMD5()
 Create TMD5 object. Set bit count to 0 and buffer to mysterious
 initialization constants.
TMD5(const UChar_t *digest)
 Create finalized TMD5 object containing passed in 16 byte digest.
TMD5(const TMD5 &md5)
 MD5 copy ctor. Special copy ctor avoids copying unnecessary
 temp arrays when finalized.
TMD5 & operator=(const TMD5 &rhs)
 MD5 assignment operator. Special assignment operator avoids
 copying unnecessary temp arrays when finalized.
void Update(const UChar_t *buf, UInt_t len)
 Update TMD5 object to reflect the concatenation of another buffer full
 of bytes.
void Final(UChar_t digest[16])
 MD5 finalization, ends an MD5 message-digest operation, writing the
 the message digest and zeroizing the context.
 Returns digest.
void Final()
 MD5 finalization, ends an MD5 message-digest operation, writing the
 the message digest and zeroizing the context.
void Print()
 Print digest in ascii hex form.
const char * AsString()
 Return message digest as string. Returns "" in case Final() has
 not yet been called. Copy result because it points to a statically
 allocated string.
void Encode(UChar_t *out, const UInt_t *in, UInt_t len)
 Encodes input into output. Assumes len is a multiple of 4.
void Decode(UInt_t *out, const UChar_t *in, UInt_t len)
 Decodes input into output. Assumes len is a multiple of 4.
void Transform(UInt_t buf[4], const UChar_t in[64])
 The core of the MD5 algorithm, this alters an existing MD5 hash to
 reflect the addition of 16 longwords of new data. Update() blocks
 the data and converts bytes into longwords for this routine.
TMD5 * ReadChecksum(const char *file)
 Returns checksum stored in ASCII in specified file. Use to read files
 created via WriteChecksum(). The returned TMD5 object must be deleted
 by the user. Returns 0 in case the file cannot be opened or in case of
 error. Static utlity function.
Int_t WriteChecksum(const char *file, const TMD5 *md5)
 Writes checksum in ASCII format to specified file. This file can
 directly be read by ReadChecksum(). The md5 must have been finalized.
 Returns -1 in case file cannot be opened or in case of error,
 0 otherwise. Static utility function.
TMD5 * FileChecksum(const char *file)
 Returns checksum of specified file. The returned TMD5 object must
 be deleted by the user. Returns 0 in case the file does not exists
 or in case of error. This function preserves the modtime of the file
 so it can be safely used in conjunction with methods that keep track
 of the file's modtime. Static utility function.
Int_t FileChecksum(const char *file, UChar_t digest[16])
 Returns checksum of specified file in digest argument. Returns -1 in
 case of error, 0 otherwise. This method preserves the modtime of the
 file so it can be safely used in conjunction with methods that keep
 track of the file's modtime. Static utility function.
virtual ~TMD5()
{ }

Author: Fons Rademakers 29/9/2001
Last update: root/base:$Name: $:$Id: TMD5.cxx,v 1.18 2006/12/01 15:19:29 rdm Exp $
Copyright (C) 1995-2001, Rene Brun and Fons Rademakers. *


ROOT page - Class index - Class Hierarchy - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.