Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

SecurePlayLibrary::MD5 Class Reference

#include <MD5.H>

List of all members.


Detailed Description

This MD5 class was ported by IT GlobalSecure to C++ from Java, which was written by Harry Mantakos harry@meretrix.com Feel free to do whatever you like with this code. If you do modify or use this code in another application, I'd be interested in hearing from you! -------------------------------------------------------------------------- See http://www.cs.umd.edu/~harry/jotp/src/md.java Written for jotp, by Harry Mantakos harry@meretrix.com

Class for implementing md4 and md5 hash algorithms. There are constructors for prepping the hash algorithm (doing the padding, mainly) for a String or a byte[], and an mdcalc() method for generating the hash. The results can be accessed as an int array by getregs(), or as a String of hex digits with toString().

Written for jotp, by Harry Mantakos harry@meretrix.com

Feel free to do whatever you like with this code. If you do modify or use this code in another application, I'd be interested in hearing from you!


Public Member Functions

 MD5 (string s)
 MD5 (vector< byte > in)
 ~MD5 ()
void calc ()
vector< bytegetHash ()
string getSHash ()

Private Member Functions

void round1 (int blk)
void round2 (int blk)
void round3 (int blk)
void round4 (int blk)
void MD5init (vector< byte > in)
string toString ()
vector< int > getregs ()

Static Private Member Functions

int F (int x, int y, int z)
int G (int x, int y, int z)
int H (int x, int y, int z)
int I (int x, int y, int z)
int rotintlft (int val, int numbits)
string tohex (int i)
vector< bytetobhex (int i)

Private Attributes

int A
int B
int C
int D
vector< int > d
int numwords


Constructor & Destructor Documentation

MD5::MD5 string  s  ) 
 

Constructs MD5 from string.

MD5::MD5 vector< byte in  ) 
 

Constrcuts MD5 from byte array.

MD5::~MD5  ) 
 

Destructor.


Member Function Documentation

void MD5::calc  ) 
 

Calculates the hash or digests the hash.

int MD5::F int  x,
int  y,
int  z
[static, private]
 

int MD5::G int  x,
int  y,
int  z
[static, private]
 

vector< byte > MD5::getHash  ) 
 

Returns the byte array of the hash.

vector< int > MD5::getregs  )  [private]
 

string MD5::getSHash  ) 
 

Returns the string of the hash.

int MD5::H int  x,
int  y,
int  z
[static, private]
 

int MD5::I int  x,
int  y,
int  z
[static, private]
 

void MD5::MD5init vector< byte in  )  [private]
 

int MD5::rotintlft int  val,
int  numbits
[static, private]
 

void MD5::round1 int  blk  )  [private]
 

void MD5::round2 int  blk  )  [private]
 

void MD5::round3 int  blk  )  [private]
 

void MD5::round4 int  blk  )  [private]
 

vector< byte > MD5::tobhex int  i  )  [static, private]
 

string MD5::tohex int  i  )  [static, private]
 

string MD5::toString  )  [private]
 


Member Data Documentation

int SecurePlayLibrary::MD5::A [private]
 

int SecurePlayLibrary::MD5::B [private]
 

int SecurePlayLibrary::MD5::C [private]
 

vector<int> SecurePlayLibrary::MD5::d [private]
 

int SecurePlayLibrary::MD5::D [private]
 

int SecurePlayLibrary::MD5::numwords [private]
 


The documentation for this class was generated from the following files: 2006 Copyright Filed by IT GlobalSecure, Inc. All Rights Reserved. Not to be used without authorization by Author. SecurePlay, IT GlobalSecure, and IT Armor are registered trademarks by IT GlobalSecure, Inc. Software protected by software license, and one or more the following U.S. and International patent numbers: U.S. Patent 6,030,288, U.S. Patent 6,165,072, European Patent Office EP1016049A1,and World Intellectual Property Organization WO9912135C1 and additional filings worldwide.