.TH "KMD4" kde3 "11 Jun 2005" "Version Version 3.4.1" "kdecore Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KMD4 \- An adapted C++ implementation of the MD4 Message-Digest algorithm. 
.PP
\fBSince:\fP
.RS 4
3.4. 
.RE
.PP
 

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kmdcodec.h>\fP
.PP
.SS "Public Types"

.in +1c
.ti -1c
.RI "typedef unsigned char \fBDigest\fP [16]"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKMD4\fP (const char *in, int len=-1)"
.br
.ti -1c
.RI "\fBKMD4\fP (const \fBQByteArray\fP &a)"
.br
.ti -1c
.RI "\fBKMD4\fP (const \fBQCString\fP &a)"
.br
.ti -1c
.RI "void \fBupdate\fP (const char *in, int len=-1)"
.br
.ti -1c
.RI "void \fBupdate\fP (const unsigned char *in, int len=-1)"
.br
.ti -1c
.RI "void \fBupdate\fP (const \fBQByteArray\fP &in)"
.br
.ti -1c
.RI "void \fBupdate\fP (const \fBQCString\fP &in)"
.br
.ti -1c
.RI "bool \fBupdate\fP (\fBQIODevice\fP &file)"
.br
.ti -1c
.RI "void \fBreset\fP ()"
.br
.ti -1c
.RI "const Digest & \fBrawDigest\fP ()"
.br
.ti -1c
.RI "void \fBrawDigest\fP (KMD4::Digest &bin)"
.br
.ti -1c
.RI "\fBQCString\fP \fBhexDigest\fP ()"
.br
.ti -1c
.RI "void \fBhexDigest\fP (\fBQCString\fP &)"
.br
.ti -1c
.RI "\fBQCString\fP \fBbase64Digest\fP ()"
.br
.ti -1c
.RI "bool \fBverify\fP (const KMD4::Digest &digest)"
.br
.ti -1c
.RI "bool \fBverify\fP (const \fBQCString\fP &)"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "void \fBtransform\fP (Q_UINT32 buf[4], Q_UINT32 const in[16])"
.br
.ti -1c
.RI "void \fBfinalize\fP ()"
.br
.in -1c
.SH "Detailed Description"
.PP 
An adapted C++ implementation of the MD4 Message-Digest algorithm. 
.PP
\fBSince:\fP
.RS 4
3.4. 
.RE
.PP


The class usage is the same as \fBKMD5\fP. 
.PP
Definition at line 577 of file kmdcodec.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KMD4::KMD4 (const char * in, int len = \fC-1\fP)"
.PP
Constructor that updates the digest for the given string. 
.PP
\fBParameters:\fP
.RS 4
\fIin\fP C string or binary data 
.br
\fIlen\fP if negative, calculates the length by using strlen on the first parameter, otherwise it trusts the given length (does not stop on NUL byte). 
.RE
.PP

.PP
Definition at line 1145 of file kmdcodec.cpp.
.PP
References update().
.SS "KMD4::KMD4 (const \fBQByteArray\fP & a)"
.PP
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
.PP
Same as above except it accepts a \fBQByteArray\fP as its argument. 
.PP
Definition at line 1151 of file kmdcodec.cpp.
.PP
References update().
.SS "KMD4::KMD4 (const \fBQCString\fP & a)"
.PP
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
.PP
Same as above except it accepts a \fBQCString\fP as its argument. 
.PP
Definition at line 1157 of file kmdcodec.cpp.
.PP
References update().
.SH "Member Function Documentation"
.PP 
.SS "void KMD4::update (const char * in, int len = \fC-1\fP)\fC [inline]\fP"
.PP
Updates the message to be digested. 
.PP
Be sure to add all data before you read the digest. After reading the digest, you can \fBnot\fP add more data!
.PP
\fBParameters:\fP
.RS 4
\fIin\fP message to be added to digest 
.br
\fIlen\fP the length of the given message. 
.RE
.PP

.PP
Definition at line 617 of file kmdcodec.h.
.PP
Referenced by KMD4(), and update().
.SS "void KMD4::update (const unsigned char * in, int len = \fC-1\fP)"
.PP
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 
.PP
Definition at line 1177 of file kmdcodec.cpp.
.PP
References endl(), and transform().
.SS "void KMD4::update (const \fBQByteArray\fP & in)"
.PP
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
.PP
\fBParameters:\fP
.RS 4
\fIin\fP message to be added to the digest (\fBQByteArray\fP). 
.RE
.PP

.PP
Definition at line 1163 of file kmdcodec.cpp.
.PP
References update().
.SS "void KMD4::update (const \fBQCString\fP & in)"
.PP
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
.PP
\fBParameters:\fP
.RS 4
\fIin\fP message to be added to the digest (\fBQCString\fP). 
.RE
.PP

.PP
Definition at line 1168 of file kmdcodec.cpp.
.PP
References update().
.SS "bool KMD4::update (\fBQIODevice\fP & file)"
.PP
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
.PP
reads the data from an I/O device, i.e. from a file (\fBQFile\fP).
.PP
NOTE that the file must be open for reading.
.PP
\fBParameters:\fP
.RS 4
\fIfile\fP a pointer to FILE as returned by calls like f{d,re}open
.RE
.PP
\fBReturns:\fP
.RS 4
false if an error occurred during reading. 
.RE
.PP

.PP
Definition at line 1235 of file kmdcodec.cpp.
.PP
References update().
.SS "void KMD4::reset ()"
.PP
Calling this function will reset the calculated message digest. 
.PP
Use this method to perform another message digest calculation without recreating the KMD4 object. 
.PP
Definition at line 1364 of file kmdcodec.cpp.
.SS "const KMD4::Digest & KMD4::rawDigest ()"
.PP
\fBReturns:\fP
.RS 4
the raw representation of the digest 
.RE
.PP

.PP
Definition at line 1309 of file kmdcodec.cpp.
.PP
References finalize().
.PP
Referenced by verify().
.SS "void KMD4::rawDigest (KMD4::Digest & bin)"
.PP
Fills the given array with the binary representation of the message digest. 
.PP
Use this method if you do not want to worry about making copy of the digest once you obtain it.
.PP
\fBParameters:\fP
.RS 4
\fIbin\fP an array of 16 characters ( char[16] ) 
.RE
.PP

.PP
Definition at line 1315 of file kmdcodec.cpp.
.PP
References finalize().
.SS "\fBQCString\fP KMD4::hexDigest ()"
.PP
Returns the value of the calculated message digest in a hexadecimal representation. 
.PP
Definition at line 1321 of file kmdcodec.cpp.
.PP
References finalize().
.PP
Referenced by verify().
.SS "void KMD4::hexDigest (\fBQCString\fP &)"
.PP
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 
.PP
Definition at line 1334 of file kmdcodec.cpp.
.PP
References finalize(), and QCString::resize().
.SS "\fBQCString\fP KMD4::base64Digest ()"
.PP
Returns the value of the calculated message digest in a base64-encoded representation. 
.PP
Definition at line 1344 of file kmdcodec.cpp.
.PP
References KCodecs::base64Encode(), and finalize().
.SS "bool KMD4::verify (const KMD4::Digest & digest)"
.PP
returns true if the calculated digest for the given message matches the given one. 
.PP
Definition at line 1297 of file kmdcodec.cpp.
.PP
References finalize(), and rawDigest().
.SS "bool KMD4::verify (const \fBQCString\fP &)"
.PP
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 
.PP
Definition at line 1303 of file kmdcodec.cpp.
.PP
References finalize(), and hexDigest().
.SS "void KMD4::transform (Q_UINT32 buf[4], Q_UINT32 const  in[16])\fC [protected]\fP"
.PP
Performs the real update work. 
.PP
Note that length is implied to be 64. 
.PP
Definition at line 1439 of file kmdcodec.cpp.
.PP
Referenced by finalize(), and update().
.SS "void KMD4::finalize ()\fC [protected]\fP"
.PP
finalizes the digest 
.PP
Definition at line 1250 of file kmdcodec.cpp.
.PP
References transform().
.PP
Referenced by base64Digest(), hexDigest(), rawDigest(), and verify().

.SH "Author"
.PP 
Generated automatically by Doxygen for kdecore Library from the source code.
