Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes

Romulus.MD5Hash Struct Reference

Represents an MD5 hash value. More...

List of all members.

Classes

struct  intConverter

Public Types

enum  Encoding { ASCII, UTF8, UTF16, Default }
 

Lists various text encodings.

More...

Public Member Functions

 MD5Hash (byte[] dataToHash)
 Creates an MD5 hash of the specified data.
 MD5Hash (string dataToHash, Encoding encoding)
 Creates an MD5 hash of a string.
 MD5Hash (string dataToHash)
 Creates an MD5 hash of a string.
override bool Equals (object obj)
 Compares this MD5 to a random object.
bool Equals (MD5Hash hash)
 Compares this MD5 hash to another MD5 hash.
override int GetHashCode ()
 Gets a hash code.
byte[] ToByteArray ()
 Gets the MD5 hash as a byte array.
override string ToString ()
 Converts the MD5 hash to a string.

Static Public Member Functions

static bool operator== (MD5Hash a, MD5Hash b)
 Defines the == operator between two MD5Hash objects.
static bool operator!= (MD5Hash a, MD5Hash b)
 Defines the != operator between two MD5Hash objects.
static MD5Hash FromByteArray (byte[] hashBytes)
 Creates an MD5 hash from a byte array.
static MD5Hash FromString (string hex)
 Returns an MD5 hash object from a properly formatted hexadecimal string.
static int getDigitValue (char c)
 For use by GetWord. Returns the value of a single hex digit.

Public Attributes

int a
int b
int c
int d

Static Public Attributes

static readonly char[] digits = new char[] { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' }
 For use by AppendDigits.

Detailed Description

Represents an MD5 hash value.


Member Enumeration Documentation

Lists various text encodings.

Enumerator:
ASCII 

ASCII encoding.

UTF8 

UTF-8 encoding.

UTF16 

UTF-16 encoding.

Default 

System default encoding.


Constructor & Destructor Documentation

Romulus.MD5Hash.MD5Hash ( byte[]  dataToHash  ) 

Creates an MD5 hash of the specified data.

Parameters:
dataToHash Binary data to hash.
Romulus.MD5Hash.MD5Hash ( string  dataToHash,
Encoding  encoding 
)

Creates an MD5 hash of a string.

Parameters:
dataToHash The string to hash.
encoding The encoding of the string.
Romulus.MD5Hash.MD5Hash ( string  dataToHash  ) 

Creates an MD5 hash of a string.

Parameters:
dataToHash The string to hash.

This overload uses the default encoding.


Member Function Documentation

override bool Romulus.MD5Hash.Equals ( object  obj  ) 

Compares this MD5 to a random object.

Parameters:
obj An object to compare to.
Returns:
A boolean indicating equality.
bool Romulus.MD5Hash.Equals ( MD5Hash  hash  ) 

Compares this MD5 hash to another MD5 hash.

Parameters:
hash The hash to compare to.
Returns:
A boolean indicating equality.
static MD5Hash Romulus.MD5Hash.FromByteArray ( byte[]  hashBytes  )  [static]

Creates an MD5 hash from a byte array.

Parameters:
hashBytes The MD5 data.
Returns:
An MD5 hash object.
static MD5Hash Romulus.MD5Hash.FromString ( string  hex  )  [static]

Returns an MD5 hash object from a properly formatted hexadecimal string.

Returns:
An MD5Hash.
static int Romulus.MD5Hash.getDigitValue ( char  c  )  [static]

For use by GetWord. Returns the value of a single hex digit.

override int Romulus.MD5Hash.GetHashCode (  ) 

Gets a hash code.

Returns:
A hash code.
static bool Romulus.MD5Hash.operator!= ( MD5Hash  a,
MD5Hash  b 
) [static]

Defines the != operator between two MD5Hash objects.

Parameters:
a An MD5 to compare.
b An MD5 to compare.
Returns:
A boolean indicating inequality.
static bool Romulus.MD5Hash.operator== ( MD5Hash  a,
MD5Hash  b 
) [static]

Defines the == operator between two MD5Hash objects.

Parameters:
a An MD5 to compare.
b An MD5 to compare.
Returns:
A boolean indicating equality.
byte [] Romulus.MD5Hash.ToByteArray (  ) 

Gets the MD5 hash as a byte array.

Returns:
A byte array containing the hash data.
override string Romulus.MD5Hash.ToString (  ) 

Converts the MD5 hash to a string.

Returns:
A string representation of the hash.

Member Data Documentation

readonly char [] Romulus.MD5Hash.digits = new char[] { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' } [static]

For use by AppendDigits.


The documentation for this struct was generated from the following file:
 All Classes Namespaces Functions Variables Enumerations Properties Events